[zorg] r370157 - [sanitizer] Move clobber into common location
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 20:20:24 PDT 2019
Author: vitalybuka
Date: Tue Aug 27 20:20:24 2019
New Revision: 370157
URL: http://llvm.org/viewvc/llvm-project?rev=370157&view=rev
Log:
[sanitizer] Move clobber into common location
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_asan.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_msan.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_ubsan.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fuzzer.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_gn.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_mte.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_standard.sh
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh Tue Aug 27 20:20:24 2019
@@ -17,6 +17,7 @@ USE_GIT=0
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
+CLOBBER="android_ndk platform-tools"
STAGE1_CLOBBER="llvm_build64 compiler_rt_build_android_* llvm_build_android_*"
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=20"
@@ -31,14 +32,7 @@ if ccache -sM 20 ; then
CMAKE_COMMON_OPTIONS="${CMAKE_COMMON_OPTIONS} -DLLVM_CCACHE_BUILD=ON"
fi
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
- rm -rf android_ndk
- rm -rf platform-tools
-fi
+clobber
download_android_tools r16
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_asan.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_asan.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_asan.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_asan.sh Tue Aug 27 20:20:24 2019
@@ -18,17 +18,7 @@ CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
-fi
-
-# CMake does not notice that the compiler itself has changed.
-# Anyway, incremental builds of stage2 and stage3 compilers don't make sense.
-# Clobber the build trees.
-rm -rf llvm_build_* libcxx_build_* llvm_build2_*
+clobber
buildbot_update
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_msan.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_msan.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_msan.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_msan.sh Tue Aug 27 20:20:24 2019
@@ -18,17 +18,7 @@ CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
-fi
-
-# CMake does not notice that the compiler itself has changed.
-# Anyway, incremental builds of stage2 and stage3 compilers don't make sense.
-# Clobber the build trees.
-rm -rf llvm_build_* libcxx_build_* llvm_build2_*
+clobber
buildbot_update
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_ubsan.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_ubsan.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_ubsan.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap_ubsan.sh Tue Aug 27 20:20:24 2019
@@ -18,17 +18,7 @@ CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
-fi
-
-# CMake does not notice that the compiler itself has changed.
-# Anyway, incremental builds of stage2 and stage3 compilers don't make sense.
-# Clobber the build trees.
-rm -rf llvm_build_* libcxx_build_* llvm_build2_*
+clobber
buildbot_update
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh Tue Aug 27 20:20:24 2019
@@ -16,10 +16,8 @@ ARCH=`uname -m`
export PATH="/usr/local/bin:$PATH"
export ANDROID_SDK_HOME=$ROOT/../../..
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm zlib clang_build llvm-project
-fi
+CLOBBER="zlib clang_build"
+clobber
# Always clobber bootstrap build trees.
rm -rf compiler_rt_build llvm_build64 llvm_build_ninja symbolizer_build*
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh Tue Aug 27 20:20:24 2019
@@ -16,15 +16,9 @@ USE_GIT=1
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
-STAGE1_CLOBBER="llvm_build_* libcxx_build_*"
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=20"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf ${STAGE1_CLOBBER}
-fi
+clobber
# Stage 1
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh Tue Aug 27 20:20:24 2019
@@ -6,6 +6,19 @@ echo
uptime
+function stage1_clobber {
+ rm -rf llvm_build2_* llvm_build_* libcxx_build_* ${STAGE1_CLOBBER:-}
+}
+
+function clobber {
+ if [ "$BUILDBOT_CLOBBER" != "" ]; then
+ echo @@@BUILD_STEP clobber@@@
+ rm -rf llvm llvm-project ${CLOBBER:-}
+ stage1_clobber
+ ! test "$(ls -A .)" || echo @@@STEP_EXCEPTION@@@
+ fi
+}
+
function update_or_checkout {
local rev_arg=$1
local repo=$2
@@ -198,6 +211,9 @@ function build_stage1_clang {
export STAGE1_DIR=llvm_build0
common_stage1_variables
build_stage1_clang_impl
+
+ echo @@@BUILD_STEP Clobber stage1 users
+ stage1_clobber
}
function build_stage1_clang_at_revison {
@@ -211,9 +227,7 @@ function build_stage1_clang_at_revison {
else
BUILDBOT_REVISION=$HOST_CLANG_REVISION buildbot_update
- echo @@@BUILD_STEP Clear ${STAGE1_DIR} ${STAGE1_CLOBBER}
- rm -rf ${STAGE1_DIR} ${STAGE1_CLOBBER}
-
+ rm -rf ${STAGE1_DIR}
echo @@@BUILD_STEP build stage1 clang at r$HOST_CLANG_REVISION@@@
build_stage1_clang_impl && \
( echo $HOST_CLANG_REVISION > ${STAGE1_DIR}/host_clang_revision )
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fuzzer.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fuzzer.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fuzzer.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fuzzer.sh Tue Aug 27 20:20:24 2019
@@ -22,12 +22,7 @@ LIBFUZZER=$LLVM/lib/Fuzzer
# Also, the Fuzzer does not provide reproducers on assertion failures yet.
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=OFF -DLLVM_PARALLEL_LINK_JOBS=8 -DLIBFUZZER_ENABLE_TESTS=ON"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
-fi
+clobber
# Make sure asan intercepts SIGABRT so that the fuzzer can print the test cases
# for assertion failures.
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_gn.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_gn.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_gn.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_gn.sh Tue Aug 27 20:20:24 2019
@@ -15,14 +15,8 @@ CHECK_LLD=${CHECK_LLD:-1}
STAGE1_CLOBBER=
STAGE2_DIR=llvm_build
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf gn
- rm -rf llvm_build0
- rm -rf ${STAGE2_DIR}
-fi
+CLOBBER="gn ${STAGE2_DIR}"
+clobber
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=20"
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_mte.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_mte.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_mte.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_mte.sh Tue Aug 27 20:20:24 2019
@@ -18,12 +18,7 @@ CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_COMPILE_JOBS=100 -DLLVM_PARALLEL_LINK_JOBS=20"
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf llvm_build0
-fi
+clobber
buildbot_update
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_standard.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_standard.sh?rev=370157&r1=370156&r2=370157&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_standard.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_standard.sh Tue Aug 27 20:20:24 2019
@@ -14,14 +14,8 @@ TSAN_DEBUG_BUILD_DIR=tsan_debug_build
TSAN_FULL_DEBUG_BUILD_DIR=tsan_full_debug_build
TSAN_RELEASE_BUILD_DIR=tsan_release_build
-if [ "$BUILDBOT_CLOBBER" != "" ]; then
- echo @@@BUILD_STEP clobber@@@
- rm -rf llvm
- rm -rf llvm-project
- rm -rf $TSAN_DEBUG_BUILD_DIR
- rm -rf $TSAN_FULL_DEBUG_BUILD_DIR
- rm -rf $TSAN_RELEASE_BUILD_DIR
-fi
+CLOBBER="$TSAN_DEBUG_BUILD_DIR $TSAN_FULL_DEBUG_BUILD_DIR $TSAN_RELEASE_BUILD_DIR"
+clobber
ROOT=`pwd`
PLATFORM=`uname`
More information about the llvm-commits
mailing list