blob: 04f2a344eb509878e7911c37bdfa33a4101f8aec (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
#!/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
origin=$2
svn=$3
# Clone Linaro repo
if [ ! -d $src/.git ]; then
mkdir -p $src
cd $src/..
safe_run git clone $origin $src
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
}
if [ -z $LLVM_SVNUSER ]; then
gitroot=https://git.linaro.org/toolchain/llvm
svnroot=https://llvm.org/svn/llvm-project
else
gitroot=ssh://$LLVM_GITUSER@review.linaro.org:29418/toolchain/llvm
svnroot=https://$LLVM_SVNUSER@llvm.org/svn/llvm-project
fi
llvm_repos=$LLVM_ROOT/repos
echo " + Setting up LLVM"
prepare $llvm_repos/llvm $gitroot/llvm $svnroot/llvm/trunk
echo " + Setting up Clang"
prepare $llvm_repos/clang $gitroot/clang $svnroot/cfe/trunk
echo " + Setting up Compiler-RT"
prepare $llvm_repos/compiler-rt $gitroot/compiler-rt $svnroot/compiler-rt/trunk
echo " + Setting up LLD Linker"
prepare $llvm_repos/lld $gitroot/lld $svnroot/lld/trunk
echo " + Setting up LibC++"
prepare $llvm_repos/libcxx $gitroot/libcxx $svnroot/libcxx/trunk
echo " + Setting up LibC++ABI"
prepare $llvm_repos/libcxxabi $gitroot/libcxxabi $svnroot/libcxxabi/trunk
echo " + Setting up LibUnwind"
prepare $llvm_repos/libunwind $gitroot/libunwind $svnroot/libunwind/trunk
echo " + Setting up LLDB Debugger"
prepare $llvm_repos/lldb $gitroot/lldb $svnroot/lldb/trunk
echo " + Setting up Test Suite"
prepare $llvm_repos/test-suite $gitroot/test-suite $svnroot/test-suite/trunk
echo " + Setting up LNT Test harness"
prepare $llvm_repos/lnt $gitroot/lnt $svnroot/lnt/trunk
echo " + Setting up Zorg Buildbot Config"
prepare $llvm_repos/zorg $gitroot/zorg $svnroot/zorg/trunk
echo " + Done"
|