diff options
Diffstat (limited to 'helpers/llvm-prepare')
-rwxr-xr-x | helpers/llvm-prepare | 87 |
1 files changed, 87 insertions, 0 deletions
diff --git a/helpers/llvm-prepare b/helpers/llvm-prepare new file mode 100755 index 0000000..204bfa4 --- /dev/null +++ b/helpers/llvm-prepare @@ -0,0 +1,87 @@ +#!/usr/bin/env bash + +# This script creates the source tree as the other LLVM scripts would like to +# find. It's recommended that you use this script before all, and keep the +# format correct, so all the other scripts work accordingly. This script +# honours the LLVM_GITRW requirement and creates the appropriate type. + +. llvm-common + +function prepare() { + src=$1 + link=$2 + origin=$3 + svn=$4 + dir=`basename $src` + # Clone Linaro repo + if [ ! -d $src/.git ]; then + mkdir -p $src + cd $src/.. + safe_run git clone $origin $dir + fi + # Link with upstream SVN + if [[ $LLVM_GITRW = 'yes' && ! -d $src/.git/svn ]]; then + cd $src + safe_run git svn init $svn --username=$LLVM_SVNUSER + safe_run git config svn-remote.svn.fetch :refs/remotes/origin/master + safe_run git svn fetch + fi + # Create the symlink into LLVM's source + if [[ $link != "no" && ! -x $link ]]; then + cd $src + ln -sf $src $link + fi +} + +echo " + Setting up LLVM" +prepare $LLVM_SRC $LLVM_SRC \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/llvm \ + https://llvm.org/svn/llvm-project/llvm/trunk +echo " + Setting up Clang" +prepare $LLVM_SRC/../clang $LLVM_SRC/tools/clang \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/clang \ + https://llvm.org/svn/llvm-project/cfe/trunk +echo " + Setting up Clang Tools Extra" +prepare $LLVM_SRC/../clang-tools-extra $LLVM_SRC/../clang/tools/extra \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/clang-tools-extra \ + https://llvm.org/svn/llvm-project/clang-tools-extra/trunk +echo " + Setting up Compiler-RT" +prepare $LLVM_SRC/../compiler-rt $LLVM_SRC/projects/compiler-rt \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/compiler-rt \ + https://llvm.org/svn/llvm-project/compiler-rt/trunk +echo " + Setting up LLD Linker" +prepare $LLVM_SRC/../lld $LLVM_SRC/tools/lld \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/lld \ + https://llvm.org/svn/llvm-project/lld/trunk +echo " + Setting up LibC++" +prepare $LLVM_SRC/../libcxx no \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/libcxx \ + https://llvm.org/svn/llvm-project/libcxx/trunk +echo " + Setting up LibC++ABI" +prepare $LLVM_SRC/../libcxxabi no \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/libcxxabi \ + https://llvm.org/svn/llvm-project/libcxxabi/trunk +echo " + Setting up LibUnwind" +prepare $LLVM_SRC/../libunwind $LLVM_SRC/projects/libunwind \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/libunwind \ + https://llvm.org/svn/llvm-project/libunwind/trunk +echo " + Setting up LLDB Debugger" +prepare $LLVM_SRC/../lldb $LLVM_SRC/tools/lldb \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/lldb \ + https://llvm.org/svn/llvm-project/lldb/trunk +echo " + Setting up Test Suite" +prepare $LLVM_SRC/../test-suite $LLVM_SRC/projects/test-suite \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/test-suite \ + https://llvm.org/svn/llvm-project/test-suite/trunk +echo " + Setting up LNT Test harness" +prepare $LLVM_SRC/../lnt $LLVM_SRC/projects/lnt \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/lnt \ + https://llvm.org/svn/llvm-project/lnt/trunk +echo " + Setting up Zorg Buildbot Config" +prepare $LLVM_SRC/../zorg $LLVM_SRC/projects/zorg \ + ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm/zorg \ + https://llvm.org/svn/llvm-project/zorg/trunk + +mkdir -p $LLVM_BLD + +echo " + Done" |