[zorg] r282700 - [asan] Buid internal symbolizer and test runtime with it
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 29 00:36:31 PDT 2016
Author: vitalybuka
Date: Thu Sep 29 02:36:31 2016
New Revision: 282700
URL: http://llvm.org/viewvc/llvm-project?rev=282700&view=rev
Log:
[asan] Buid internal symbolizer and test runtime with it
Reviewers: eugenis
Subscribers: beanz, mgorny
Differential Revision: https://reviews.llvm.org/D25061
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh
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=282700&r1=282699&r2=282700&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_cmake.sh Thu Sep 29 02:36:31 2016
@@ -18,15 +18,16 @@ export ANDROID_SDK_HOME=$ROOT/../../..
if [ "$BUILDBOT_CLOBBER" != "" ]; then
echo @@@BUILD_STEP clobber@@@
- rm -rf llvm clang_build
+ rm -rf llvm zlib clang_build
fi
# Always clobber bootstrap build trees.
-rm -rf compiler_rt_build llvm_build64 llvm_build_ninja
+rm -rf compiler_rt_build llvm_build64 llvm_build_ninja symbolizer_build*
SUPPORTS_32_BITS=${SUPPORTS_32_BITS:-1}
MAKE_JOBS=${MAX_MAKE_JOBS:-16}
LLVM_CHECKOUT=$ROOT/llvm
+ZLIB=$ROOT/zlib
COMPILER_RT_CHECKOUT=$LLVM_CHECKOUT/projects/compiler-rt
CMAKE_COMMON_OPTIONS="-DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_PARALLEL_LINK_JOBS=10"
ENABLE_LIBCXX_FLAG=
@@ -108,6 +109,8 @@ esac
echo @@@BUILD_STEP update@@@
buildbot_update
+echo @@@BUILD_STEP update zlib@@@
+git -C $ZLIB pull --rebase || git clone https://github.com/madler/zlib.git $ZLIB || echo @@@STEP_WARNINGS@@@
echo @@@BUILD_STEP lint@@@
CHECK_LINT=${COMPILER_RT_CHECKOUT}/lib/sanitizer_common/scripts/check_lint.sh
@@ -175,6 +178,9 @@ fi
# Now build everything else.
(cd llvm_build64 && make -j$MAKE_JOBS) || echo @@@STEP_FAILURE@@@
+# Symbolizer dependencies.
+(cd llvm_build64 && make -j$MAKE_JOBS llvm-ar llvm-link llvm-tblgen opt) || echo @@@STEP_FAILURE@@@
+
# FIXME: Make these true dependencies of check-cfi-and-supported when
# compiler-rt is configured as an external project.
(cd llvm_build64 && make -j$MAKE_JOBS LLVMgold opt sanstats) || echo @@@STEP_FAILURE@@@
@@ -219,6 +225,22 @@ fi
echo @@@BUILD_STEP test standalone compiler-rt@@@
(cd compiler_rt_build && make -j$MAKE_JOBS check-all) || echo @@@STEP_FAILURE@@@
+build_symbolizer() {
+ echo @@@BUILD_STEP build $1-bit symbolizer for $2@@@
+ if [ ! -d symbolizer_build$1 ]; then
+ mkdir symbolizer_build$1
+ fi
+ (cd symbolizer_build$1 && ZLIB_SRC=$ZLIB FLAGS=-m$1 \
+ CLANG=${FRESH_CLANG_PATH}/clang \
+ bash -eux $COMPILER_RT_CHECKOUT/lib/sanitizer_common/symbolizer/scripts/build_symbolizer.sh \
+ $(dirname $(find ../$2/ -name libclang_rt.*.a | head -n1)) || echo @@@STEP_WARNINGS@@@)
+}
+build_symbolizer 32 compiler_rt_build
+build_symbolizer 64 compiler_rt_build
+
+echo @@@BUILD_STEP test standalone compiler-rt with symbolizer@@@
+(cd compiler_rt_build && make -j$MAKE_JOBS check-all) || echo @@@STEP_WARNINGS@@@
+
HAVE_NINJA=${HAVE_NINJA:-1}
if [ "$PLATFORM" == "Linux" -a $HAVE_NINJA == 1 ]; then
echo @@@BUILD_STEP build with ninja@@@
@@ -249,6 +271,28 @@ if [ "$PLATFORM" == "Linux" -a $HAVE_NIN
check_ninja $CHECK_SCUDO scudo
check_ninja $CHECK_TSAN tsan
check_ninja $CHECK_UBSAN ubsan
+
+ build_symbolizer 32 llvm_build_ninja
+ build_symbolizer 64 llvm_build_ninja
+
+ check_ninja_with_symbolizer() {
+ CONDITION=$1
+ SANITIZER=$2
+ if [ "$CONDITION" == "1" ]; then
+ echo @@@BUILD_STEP ninja check-$SANITIZER with symbolizer@@@
+ (cd llvm_build_ninja && ninja check-$SANITIZER) || echo @@@STEP_WARNINGS@@@
+ fi
+ }
+
+ check_ninja_with_symbolizer 1 sanitizer
+ check_ninja_with_symbolizer $CHECK_ASAN asan
+ check_ninja_with_symbolizer $CHECK_CFI cfi-and-supported
+ check_ninja_with_symbolizer $CHECK_DFSAN dfsan
+ check_ninja_with_symbolizer $CHECK_LSAN lsan
+ check_ninja_with_symbolizer $CHECK_MSAN msan
+ check_ninja_with_symbolizer $CHECK_SCUDO scudo
+ check_ninja_with_symbolizer $CHECK_TSAN tsan
+ check_ninja_with_symbolizer $CHECK_UBSAN ubsan
fi
if [ $BUILD_ANDROID == 1 ] ; then
More information about the llvm-commits
mailing list