diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-04-19 16:46:44 +0100 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-04-20 10:28:27 +0100 |
commit | 63a2eaed34053088f2b499ec72d51258d13031cf (patch) | |
tree | c59526801afad024f874e03372d617ef1674c022 /tcwg-llvm-build.sh | |
parent | e3fc7c8c625a4b341fe27dba6058c3b761cbff7f (diff) |
tcwg-llvm-*: Use reference git clone
Updates:
- Using $REFDIR instead of hard-coding (don't need parameter yet)
- Using flock on non-new directory, to avoid rsync problems
Change-Id: I64aff86df2cf0090b87e35ca3bc588ba39473781
Diffstat (limited to 'tcwg-llvm-build.sh')
-rwxr-xr-x | tcwg-llvm-build.sh | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh index 7f20485f..fc69b987 100755 --- a/tcwg-llvm-build.sh +++ b/tcwg-llvm-build.sh @@ -159,6 +159,7 @@ fi SRCDIR="$WORKSPACE/llvm" BUILDDIR="$WORKSPACE/build" INSTDIR="$WORKSPACE/install" +REFDIR="$HOME/llvm-reference" # Dump echo "BUILDTYPE = $BUILDTYPE" @@ -166,6 +167,7 @@ echo "ASSERTS = $ASSERTS" echo "SRCDIR = $SRCDIR" echo "BUILDDIR = $BUILDDIR" echo "INSTDIR = $INSTDIR" +echo "REFDIR = $REFDIR" echo "BUILDJOBS = $BUILDJOBS" echo "LINKJOBS = $LINKJOBS" echo "TOOLCHAIN = $TOOLCHAIN" @@ -177,8 +179,15 @@ LOGBASE="$WORKSPACE/tcwg-llvm" LOGEXT="txt" # Checkout -git clone --depth 1 http://llvm.org/git/llvm.git "$SRCDIR" |& tee "$LOGBASE-clone.$LOGEXT" -git clone --depth 1 http://llvm.org/git/clang.git "$SRCDIR/tools/clang" |& tee -a "$LOGBASE-clone.$LOGEXT" +{ + flock -s 9 + git clone --depth 1 http://llvm.org/git/llvm.git \ + --reference "$REFDIR/llvm" \ + "$SRCDIR" |& tee "$LOGBASE-clone.$LOGEXT" + git clone --depth 1 http://llvm.org/git/clang.git \ + --reference "$REFDIR/clang" \ + "$SRCDIR/tools/clang" |& tee -a "$LOGBASE-clone.$LOGEXT" +) 9>$REFDIR.lock # CMake OPTIONS="-DLLVM_BUILD_TESTS=True " |