[zorg] r370165 - [sanitizer] Switch android bot to use git
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 28 01:04:41 PDT 2019
Author: vitalybuka
Date: Wed Aug 28 01:04:41 2019
New Revision: 370165
URL: http://llvm.org/viewvc/llvm-project?rev=370165&view=rev
Log:
[sanitizer] Switch android bot to use git
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.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=370165&r1=370164&r2=370165&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android.sh Wed Aug 28 01:04:41 2019
@@ -13,12 +13,13 @@ PLATFORM=`uname`
LOCAL_IPS=`hostname -I`
export PATH="/usr/local/bin:$PATH"
-USE_GIT=0
+USE_GIT=1
CHECK_LIBCXX=${CHECK_LIBCXX:-1}
CHECK_LLD=${CHECK_LLD:-1}
LLVM=$ROOT/llvm
-CMAKE_COMMON_OPTIONS="-GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=20"
+CMAKE_COMMON_OPTIONS="${CMAKE_COMMON_OPTIONS:-}"
+CMAKE_COMMON_OPTIONS="${CMAKE_COMMON_OPTIONS:-} -GNinja -DCMAKE_BUILD_TYPE=Release -DLLVM_PARALLEL_LINK_JOBS=20"
if [ -e /usr/include/plugin-api.h ]; then
CMAKE_COMMON_OPTIONS="${CMAKE_COMMON_OPTIONS} -DLLVM_BINUTILS_INCDIR=/usr/include"
@@ -37,7 +38,7 @@ buildbot_update
CMAKE_COMMON_OPTIONS="$CMAKE_COMMON_OPTIONS -DLLVM_ENABLE_ASSERTIONS=ON"
-build_clang64
+build_stage2_android
# Android NDK has no iconv.h which is requred by LIBXML2.
CMAKE_COMMON_OPTIONS="${CMAKE_COMMON_OPTIONS} -DLLVM_LIBXML2_ENABLED=OFF"
Modified: zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
URL: http://llvm.org/viewvc/llvm-project/zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh?rev=370165&r1=370164&r2=370165&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh Wed Aug 28 01:04:41 2019
@@ -1,7 +1,8 @@
#!/usr/bin/env bash
CLOBBER="android_ndk android-ndk-* platform-tools *.zip shards_* test_android_* tested_arch_*"
-STAGE1_CLOBBER="llvm_build64 compiler_rt_build_android_* llvm_build_android_*"
+STAGE2_CLOBBER="compiler_rt_build_android_* llvm_build_android_*"
+STAGE1_CLOBBER="llvm_build64 ${STAGE2_CLOBBER}"
function download_android_tools {
local VERSION=android-ndk-$1
@@ -29,11 +30,16 @@ function download_android_tools {
export PATH=$ROOT/platform-tools/:$PATH
}
-function build_clang64() {
+function build_stage2_android() {
# Build self-hosted tree with fresh Clang and -Werror.
local CMAKE_OPTIONS="${CMAKE_COMMON_OPTIONS} -DLLVM_ENABLE_WERROR=ON ${STAGE1_AS_COMPILER} -DCMAKE_C_FLAGS=-gmlt -DCMAKE_CXX_FLAGS=-gmlt"
+ if [[ "$USE_GIT" != "0" ]]; then
+ CMAKE_OPTIONS="${CMAKE_OPTIONS} -DLLVM_ENABLE_PROJECTS='clang;compiler-rt;lld'"
+ fi
echo @@@BUILD_STEP bootstrap clang@@@
+ rm -rf ${STAGE2_CLOBBER}
+
mkdir -p llvm_build64
if [[ "$(cat llvm_build64/CMAKE_OPTIONS)" != "${CMAKE_OPTIONS}" ]] ; then
(cd llvm_build64 && cmake ${CMAKE_OPTIONS} -DLLVM_BUILD_EXTERNAL_COMPILER_RT=ON $LLVM && \
@@ -83,6 +89,11 @@ function configure_android { # ARCH trip
-DLLVM_TABLEGEN=$ROOT/llvm_build64/bin/llvm-tblgen \
${CMAKE_COMMON_OPTIONS} \
$LLVM || echo @@@STEP_FAILURE@@@) &
+
+ local COMPILER_RT_OPTIONS="$LLVM/projects/compiler-rt"
+ if [[ "$USE_GIT" != "0" ]]; then
+ COMPILER_RT_OPTIONS="$(readlink -f $LLVM/../compiler-rt)"
+ fi
(cd compiler_rt_build_android_$_arch && cmake \
-DCMAKE_C_COMPILER=$ROOT/llvm_build64/bin/clang \
@@ -101,7 +112,7 @@ function configure_android { # ARCH trip
-DCOMPILER_RT_EXEC_OUTPUT_DIR="$ANDROID_EXEC_OUTPUT_DIR" \
-DLLVM_LIT_ARGS="-sv --show-unsupported --show-xfail" \
${CMAKE_COMMON_OPTIONS} \
- $LLVM/projects/compiler-rt || echo @@@STEP_FAILURE@@@) &
+ ${COMPILER_RT_OPTIONS} || echo @@@STEP_FAILURE@@@) &
}
function build_android {
More information about the llvm-commits
mailing list