[zorg] r370124 - [sanitizer] Cleanup STAGE2 dir variables
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 27 15:38:52 PDT 2019
Author: vitalybuka
Date: Tue Aug 27 15:38:52 2019
New Revision: 370124
URL: http://llvm.org/viewvc/llvm-project?rev=370124&view=rev
Log:
[sanitizer] Cleanup STAGE2 dir variables
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap.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_fast.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh?rev=370124&r1=370123&r2=370124&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_bootstrap.sh Tue Aug 27 15:38:52 2019
@@ -16,9 +16,7 @@ USE_GIT=0
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
STAGE1_DIR=llvm_build0
-STAGE2_ASAN_DIR=llvm_build_asan
-STAGE2_LIBCXX_ASAN_DIR=libcxx_build_asan
-STAGE3_ASAN_DIR=llvm_build2_asan
+STAGE3_DIR=llvm_build2_asan
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
@@ -32,9 +30,8 @@ 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 ${STAGE2_LIBCXX_ASAN_DIR}
-rm -rf ${STAGE2_ASAN_DIR}
-rm -rf ${STAGE3_ASAN_DIR}
+rm -rf llvm_build_* libcxx_build_*
+rm -rf ${STAGE3_DIR}
echo @@@BUILD_STEP update@@@
buildbot_update
@@ -55,18 +52,18 @@ check_stage2_asan
echo @@@BUILD_STEP build stage3/asan clang@@@
-mkdir -p ${STAGE3_ASAN_DIR}
+mkdir -p ${STAGE3_DIR}
-clang_asan_path=$ROOT/${STAGE2_ASAN_DIR}/bin
+clang_asan_path=$ROOT/${STAGE2_DIR}/bin
cmake_stage3_asan_options="${CMAKE_COMMON_OPTIONS} -DCMAKE_C_COMPILER=${clang_asan_path}/clang -DCMAKE_CXX_COMPILER=${clang_asan_path}/clang++"
export ASAN_OPTIONS="check_initialization_order=true:detect_stack_use_after_return=1:detect_leaks=1"
-(cd ${STAGE3_ASAN_DIR} && cmake ${cmake_stage3_asan_options} $LLVM && ninja clang) || \
+(cd ${STAGE3_DIR} && cmake ${cmake_stage3_asan_options} $LLVM && ninja clang) || \
echo @@@STEP_FAILURE@@@
echo @@@BUILD_STEP check-llvm check-clang stage3/asan@@@
-(cd ${STAGE3_ASAN_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
-(cd ${STAGE3_ASAN_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
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=370124&r1=370123&r2=370124&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 15:38:52 2019
@@ -16,9 +16,7 @@ USE_GIT=0
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
STAGE1_DIR=llvm_build0
-STAGE2_MSAN_DIR=llvm_build_msan
-STAGE2_LIBCXX_MSAN_DIR=libcxx_build_msan
-STAGE3_MSAN_DIR=llvm_build2_msan
+STAGE3_DIR=llvm_build2_msan
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
@@ -32,9 +30,8 @@ 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 ${STAGE2_LIBCXX_MSAN_DIR}
-rm -rf ${STAGE2_MSAN_DIR}
-rm -rf ${STAGE3_MSAN_DIR}
+rm -rf llvm_build_* libcxx_build_*
+rm -rf ${STAGE3_DIR}
echo @@@BUILD_STEP update@@@
buildbot_update
@@ -55,16 +52,16 @@ check_stage2_msan
echo @@@BUILD_STEP build stage3/msan clang@@@
-mkdir -p ${STAGE3_MSAN_DIR}
+mkdir -p ${STAGE3_DIR}
-clang_msan_path=$ROOT/${STAGE2_MSAN_DIR}/bin
+clang_msan_path=$ROOT/${STAGE2_DIR}/bin
cmake_stage3_msan_options="${CMAKE_COMMON_OPTIONS} -DCMAKE_C_COMPILER=${clang_msan_path}/clang -DCMAKE_CXX_COMPILER=${clang_msan_path}/clang++"
-(cd ${STAGE3_MSAN_DIR} && cmake ${cmake_stage3_msan_options} $LLVM && ninja clang) || \
+(cd ${STAGE3_DIR} && cmake ${cmake_stage3_msan_options} $LLVM && ninja clang) || \
echo @@@STEP_FAILURE@@@
echo @@@BUILD_STEP check-llvm check-clang stage3/msan@@@
-(cd ${STAGE3_MSAN_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
-(cd ${STAGE3_MSAN_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
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=370124&r1=370123&r2=370124&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 15:38:52 2019
@@ -16,9 +16,7 @@ USE_GIT=0
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
STAGE1_DIR=llvm_build0
-STAGE2_UBSAN_DIR=llvm_build_ubsan
-STAGE2_LIBCXX_UBSAN_DIR=libcxx_build_ubsan
-STAGE3_UBSAN_DIR=llvm_build2_ubsan
+STAGE3_DIR=llvm_build2_ubsan
LLVM=$ROOT/llvm
CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=20"
@@ -32,9 +30,8 @@ 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 ${STAGE2_LIBCXX_UBSAN_DIR}
-rm -rf ${STAGE2_UBSAN_DIR}
-rm -rf ${STAGE3_UBSAN_DIR}
+rm -rf llvm_build_* libcxx_build_*
+rm -rf ${STAGE3_DIR}
echo @@@BUILD_STEP update@@@
buildbot_update
@@ -55,16 +52,16 @@ check_stage2_ubsan
echo @@@BUILD_STEP build stage3/ubsan clang@@@
-mkdir -p ${STAGE3_UBSAN_DIR}
+mkdir -p ${STAGE3_DIR}
-clang_ubsan_path=$ROOT/${STAGE2_UBSAN_DIR}/bin
+clang_ubsan_path=$ROOT/${STAGE2_DIR}/bin
cmake_stage3_ubsan_options="${CMAKE_COMMON_OPTIONS} -DCMAKE_C_COMPILER=${clang_ubsan_path}/clang -DCMAKE_CXX_COMPILER=${clang_ubsan_path}/clang++"
-(cd ${STAGE3_UBSAN_DIR} && cmake ${cmake_stage3_ubsan_options} $LLVM && ninja clang) || \
+(cd ${STAGE3_DIR} && cmake ${cmake_stage3_ubsan_options} $LLVM && ninja clang) || \
echo @@@STEP_FAILURE@@@
echo @@@BUILD_STEP check-llvm check-clang stage3/ubsan@@@
-(cd ${STAGE3_UBSAN_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
-(cd ${STAGE3_UBSAN_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-llvm) || echo @@@STEP_FAILURE@@@
+(cd ${STAGE3_DIR} && ninja check-clang) || echo @@@STEP_FAILURE@@@
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=370124&r1=370123&r2=370124&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_fast.sh Tue Aug 27 15:38:52 2019
@@ -16,21 +16,15 @@ USE_GIT=1
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
STAGE1_DIR=llvm_build0
-STAGE2_ASAN_DIR=llvm_build_asan
-STAGE2_MSAN_DIR=llvm_build_msan
-STAGE2_UBSAN_DIR=llvm_build_ubsan
-STAGE2_LIBCXX_MSAN_DIR=libcxx_build_msan
-STAGE2_LIBCXX_ASAN_DIR=libcxx_build_asan
-STAGE2_LIBCXX_UBSAN_DIR=libcxx_build_ubsan
-STAGE1_CLOBBER="${STAGE2_LIBCXX_MSAN_DIR} ${STAGE2_LIBCXX_ASAN_DIR} ${STAGE2_LIBCXX_UBSAN_DIR} ${STAGE2_MSAN_DIR} ${STAGE2_ASAN_DIR} ${STAGE2_UBSAN_DIR}"
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_DIR}
+ rm -rf ${STAGE1_CLOBBER}
fi
# 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=370124&r1=370123&r2=370124&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_functions.sh Tue Aug 27 15:38:52 2019
@@ -217,9 +217,10 @@ function common_stage2_variables {
function build_stage2 {
local sanitizer_name=$1
- local libcxx_build_dir=$2
- local build_dir=$3
- local step_result=$4
+ local step_result=$2
+ local libcxx_build_dir=libcxx_build_${sanitizer_name}
+ local build_dir=llvm_build_${sanitizer_name}
+ export STAGE2_DIR=${build_dir}
common_stage2_variables
@@ -308,21 +309,22 @@ function build_stage2 {
}
function build_stage2_msan {
- build_stage2 msan "${STAGE2_LIBCXX_MSAN_DIR}" "${STAGE2_MSAN_DIR}" @@@STEP_FAILURE@@@
+ build_stage2 msan @@@STEP_FAILURE@@@
}
function build_stage2_asan {
- build_stage2 asan "${STAGE2_LIBCXX_ASAN_DIR}" "${STAGE2_ASAN_DIR}" @@@STEP_FAILURE@@@
+ build_stage2 asan @@@STEP_FAILURE@@@
}
function build_stage2_ubsan {
- build_stage2 ubsan "${STAGE2_LIBCXX_UBSAN_DIR}" "${STAGE2_UBSAN_DIR}" @@@STEP_FAILURE@@@
+ build_stage2 ubsan @@@STEP_FAILURE@@@
}
function check_stage2 {
local sanitizer_name=$1
- local build_dir=$2
- local step_result=$3
+ local step_result=$2
+ local build_dir=${STAGE2_DIR}
+
echo @@@BUILD_STEP check-llvm ${sanitizer_name}@@@
(cd ${build_dir} && ninja check-llvm) || echo $step_result
@@ -338,13 +340,13 @@ function check_stage2 {
}
function check_stage2_msan {
- check_stage2 msan "${STAGE2_MSAN_DIR}" @@@STEP_FAILURE@@@
+ check_stage2 msan @@@STEP_FAILURE@@@
}
function check_stage2_asan {
- check_stage2 asan "${STAGE2_ASAN_DIR}" @@@STEP_FAILURE@@@
+ check_stage2 asan @@@STEP_FAILURE@@@
}
function check_stage2_ubsan {
- check_stage2 ubsan "${STAGE2_UBSAN_DIR}" @@@STEP_FAILURE@@@
+ check_stage2 ubsan @@@STEP_FAILURE@@@
}
More information about the llvm-commits
mailing list