aboutsummaryrefslogtreecommitdiff
path: root/helpers/llvm-sync
diff options
context:
space:
mode:
Diffstat (limited to 'helpers/llvm-sync')
-rwxr-xr-xhelpers/llvm-sync58
1 files changed, 33 insertions, 25 deletions
diff --git a/helpers/llvm-sync b/helpers/llvm-sync
index 5d5cb27..0374221 100755
--- a/helpers/llvm-sync
+++ b/helpers/llvm-sync
@@ -19,48 +19,47 @@ function repo_sync () {
}
prog=`basename $0`
-syntax="Syntax: $prog [-clang-tools-e(x)tra] [-compiler(r)T] [-(l)ibs] [-Lin(k)er] [-(d)ebugger] [-(t)ests] [-(w)eb pages] [-(a)ll]"
+clang=false
cextra=false
rt=false
-libs=false
+libcxx=false
+libcxxabi=false
+libunwind=false
linker=false
debug=false
tests=false
web=false
+if [ -d $LLVM_SRC/tools/clang ]; then clang=true; fi
+if [ -d $LLVM_SRC/tools/clang/tools/extra ]; then cextra=true; fi
+if [ -d $LLVM_SRC/projects/compiler-rt ]; then rt=true; fi
+if [ -d $LLVM_SRC/projects/libcxx ]; then libcxx=true; fi
+if [ -d $LLVM_SRC/projects/libcxxabi ]; then libcxxabi=true; fi
+if [ -d $LLVM_SRC/projects/libunwind ]; then libunwind=true; fi
+if [ -d $LLVM_SRC/tools/lld ]; then linker=true; fi
+if [ -d $LLVM_SRC/tools/lldb ]; then debug=true; fi
+if [ -d $LLVM_SRC/projects/test-suite ]; then tests=true; fi
-while getopts "xrlkdtwa" opt; do
+while getopts "wa" opt; do
case $opt in
- x)
- cextra=true
- ;;
- r)
- rt=true
- ;;
- l)
- libs=true
- ;;
- k)
- linker=true
- ;;
- d)
- debug=true
- ;;
- t)
- tests=true
- ;;
w)
web=true
;;
a)
+ clang=true
cextra=true
rt=true
- libs=true
+ libcxx=true
+ libcxxabi=true
+ libunwind=true
linker=true
debug=true
tests=true
;;
*)
- echo $syntax
+ echo "Syntax: $prog [-(w)eb pages] [-(a)ll]"
+ echo "Syncs the repos that are currently linked into the llvm source tree"
+ echo "-w forces sync for the web repos (which are never linked)"
+ echo "-a forces sync for non-web repos that are not linked"
exit 1
;;
esac
@@ -68,7 +67,10 @@ done
# Compulsory updates
repo_sync LLVM $LLVM_SRC
-repo_sync Clang $LLVM_SRC/../clang
+
+if $clang; then
+ repo_sync Clang $LLVM_SRC/../clang
+fi
# Optional updates
if $cextra; then
@@ -79,9 +81,15 @@ if $rt; then
repo_sync RT $LLVM_SRC/../compiler-rt
fi
-if $libs; then
+if $libcxx; then
repo_sync LibC++ $LLVM_SRC/../libcxx
+fi
+
+if $libcxxabi; then
repo_sync LibC++ABI $LLVM_SRC/../libcxxabi
+fi
+
+if $libunwind; then
repo_sync LibUnwind $LLVM_SRC/../libunwind
fi