forked from supertanglang/about-compiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautogetllvm.sh
executable file
·68 lines (61 loc) · 1.81 KB
/
autogetllvm.sh
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
#!/bin/sh
#############################################
# 自动下载llvm及clang项目 #
############################################
##安装git
if [ -f /usr/bin/git ]; then
echo "founding git"
else
echo "installing git"
sudo apt-get install git
fi
##git库信息
llvm_git="https://gitee.com/yejinlei-mirror/llvm.git"
clang_git="https://gitee.com/yejinlei-mirror/clang.git"
tools_extra_git="http://gitee.com/yejinlei-mirror/clang-tools-extra.git"
compiler_rt_git="http://gitee.com/yejinlei-mirror/compiler-rt.git"
#lldb_git="https://gitee.com/yejinlei-mirror/lldb.git"
#dragonegg_git="https://gitee.com/yejinlei-mirror/dragonegg.git"
libcxx_git="https://gitee.com/yejinlei-mirror/libcxx.git"
modules="$llvm_git $clang_git $tools_extra_git $compiler_rt_git $libcxx_git"
##当前目录下创建src
if [ -e $PWD/src ]
then
echo "founding $PWD/src"
else
echo "mkdir $PWD/src"
mkdir $PWD/src
fi
cd $PWD/src
echo "cd $PWD"
# 目录层次 git依赖关系
# llvm <-git
# |tools
# |clang <-git
# tools
# |extra or clang-tools-extra <-git
# |projects
# |lldb <-git
# |test-suite <-git
# |libcxxabi <-git
# |libcxx <-git
# |dragonegg <-git
# |compiler-rt <-git
##并发克隆git库
for i in $modules
do
{
echo "git clone $i"
git clone $i
}
done
wait
echo "finish clone!"
##调整目录层次
mv -f ./clang ./llvm/tools/
mv -f ./clang-tools-extra ./llvm/tools/clang/tools/
#mv -f ./lldb ./llvm/projects/
#mv -f ./dragonegg ./llvm/projects/
mv -f ./libcxx ./llvm/projects/
mv -f ./compiler-rt ./llvm/projects/
exit 0