diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-03-17 13:30:01 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-03-17 14:17:03 +0000 |
commit | 14e0e88705a0dfead8cca50763a7ffb0eb46c7b6 (patch) | |
tree | 4cf2b10b2b33cac8285041492c815ee22498d58f /tcwg-llvm-build.sh | |
parent | 2c3967198ea57da020f95600110ca85287558f0c (diff) |
tcwg-llvm-build.sh: Fix clone/install, add logs
Fixing a few issues with cloning the repos and installing on the wrong prefix
(LLVM forces the prefix, we need to use DESTDIR), as well as adding logs
to each step (and splitting into more steps), so that Jenkins can use them as
artifacts.
Change-Id: I69d9fb6cc477388a97dc4bc0f1884c6c529d97c8
Diffstat (limited to 'tcwg-llvm-build.sh')
-rwxr-xr-x | tcwg-llvm-build.sh | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh index 4c758b37..8efef9d2 100755 --- a/tcwg-llvm-build.sh +++ b/tcwg-llvm-build.sh @@ -5,6 +5,7 @@ # https://git.linaro.org/toolchain/llvm/linaro-scripts.git set -e +set -o pipefail # Syntax SYN_BUILD="--build={ninja|make} (def. make)" @@ -169,18 +170,23 @@ echo "INSTDIR = $INSTDIR" echo "BUILDJOBS = $BUILDJOBS" echo "LINKJOBS = $LINKJOBS" +# Logs +LOGBASE="$SRCDIR/../tcwg-llvm" +LOGEXT="txt" + # Checkout -cd "$SRCDIR" && git clone http://llvm.org/git/llvm.git -cd "$SRCDIR/llvm/tools" && git clone http://llvm.org/git/clang.git +git clone http://llvm.org/git/llvm.git "$SRCDIR" |& tee "$LOGBASE-clone.$LOGEXT" +git clone http://llvm.org/git/clang.git "$SRCDIR/tools/clang" |& tee -a "$LOGBASE-clone.$LOGEXT" # CMake OPTIONS="-DLLVM_BUILD_TESTS=True " OPTIONS+="-DCMAKE_BUILD_TYPE='$BUILDTYPE' " OPTIONS+="-DLLVM_ENABLE_ASSERTIONS='$ASSERTS' " -OPTIONS+="-DCMAKE_INSTALL_PREFIX='$INSTDIR' " OPTIONS+="-DLLVM_PARALLEL_COMPILE_JOBS='$BUILDJOBS' " OPTIONS+="-DLLVM_PARALLEL_LINK_JOBS='$LINKJOBS' " -cd "$BUILDDIR" && cmake -G "$GEN" "$SRCDIR" "$OPTIONS" -DLLVM_LIT_ARGS="-sv -j$CPUS" +cd "$BUILDDIR" && cmake -G "$GEN" "$SRCDIR" "$OPTIONS" -DLLVM_LIT_ARGS="-sv -j$CPUS" |& tee "$LOGBASE-cmake.$LOGEXT" # Build + check -cd "$BUILDDIR" && ninja "-j$CPUS" check-all +cd "$BUILDDIR" && $BUILD "-j$CPUS" |& tee "$LOGBASE-build.$LOGEXT" +cd "$BUILDDIR" && $BUILD "-j$CPUS" check-all |& tee "$LOGBASE-check.$LOGEXT" +cd "$BUILDDIR" && $BUILD "-j$CPUS" DESTDIR="$INSTDIR" install |& tee "$LOGBASE-install.$LOGEXT" |