diff options
author | Renato Golin <renato.golin@linaro.org> | 2017-05-05 18:58:55 +0100 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2017-05-08 18:28:01 +0100 |
commit | 22259b91409bac424d562ac7519bf70d34df0996 (patch) | |
tree | b260cd8f284a8948eb9a645de7c705317b627d3b /tcwg-llvm-build.sh | |
parent | 1f4988986deb6742189aa180609ab474cfc4612e (diff) |
tcwg-llvm-*: Always use build ID and rev to identify builds
To make sure stage two builds the same revision as stage 1 and to
correctly identify the SVN revision of an LLVM build, calculate the SVN
revision if one it not provided.
Always passing down toolchain and revision, as they should always be
available at that point. The test-suite job is free to ignore it.
Change-Id: I5a79284ac4fbc5a42e5d85e69f39a8c6d68e0cc6
Diffstat (limited to 'tcwg-llvm-build.sh')
-rwxr-xr-x | tcwg-llvm-build.sh | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tcwg-llvm-build.sh b/tcwg-llvm-build.sh index dc4dde96..044e98b1 100755 --- a/tcwg-llvm-build.sh +++ b/tcwg-llvm-build.sh @@ -184,10 +184,15 @@ LOGEXT="txt" "$SRCDIR/tools/clang" |& tee -a "$LOGBASE-clone.$LOGEXT" } 9>"$REFDIR.lock" -# Move down to the right revision if [ ! -z "$REVISION" ]; then + # Move down to the right revision update_git "$SRCDIR" "$REVISION" update_git "$SRCDIR/tools/clang" "$REVISION" +else + # Get the latest revision from all repos + LLVM_REV="$(find_svn_rev "$SRCDIR")" + CLANG_REV="$(find_svn_rev "$SRCDIR/tools/clang")" + REVISION="r$(find_last_rev "$LLVM_REV" "$CLANG_REV")" fi # CMake @@ -209,7 +214,7 @@ mkdir -p "$INSTDIR" cd "$BUILDDIR" && ninja "-j$CPUS" install |& tee "$LOGBASE-install.$LOGEXT" # Pack & Ship -PKGTAG="$BUILDID" +PKGTAG="$BUILDID-$REVISION" TARGET=$("$BUILDDIR/bin/clang" --version | awk '/Target:/ { print $2 }') PKGNAME="$(push_binary_name "$PKGTAG" "$TARGET")" PKGDIR="$WORKSPACE/$PKGNAME" @@ -223,5 +228,6 @@ cd "$WORKSPACE" && scp "$PKGNAME.$PUSHSUFFIX" "$(push_scp_url "$PUSHTYPE")" # Create toolchain file (wget URL) if [ "$TOOLCHAIN_FILE" != "" ]; then - echo "$(push_wget_url "$PKGTAG" "$TARGET" "$PUSHTYPE")" >> "$TOOLCHAIN_FILE" + echo "toolchain=$(push_wget_url "$PKGTAG" "$TARGET" "$PUSHTYPE")" >> "$TOOLCHAIN_FILE" + echo "revision=$REVISION" >> "$TOOLCHAIN_FILE" fi |