[zorg] r344753 - [Zorg] Reland "Fix Android sanitizer flags."
Dan Albert via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 18 12:34:47 PDT 2018
Author: danalbert
Date: Thu Oct 18 12:34:47 2018
New Revision: 344753
URL: http://llvm.org/viewvc/llvm-project?rev=344753&view=rev
Log:
[Zorg] Reland "Fix Android sanitizer flags."
This builder uses an old version of the NDK with a just-built version
of the Clang. This builder is making use of an NDK standalone
toolchain. For older NDKs, these toolchins have the C++ stdlib headers
and libraries installed to the GNU stdlib paths.
This causes an issue when I try to update the default -stdlib for
Android targets in Clang as this builder will begin looking in the
libc++ paths when it does not have an STL available at that path.
Explicitly use `-stdlib=libstdc++` to keep the old tools working with
a new Clang until this builder is using an NDK new enough to not need
it (NDK r19).
This relands https://reviews.llvm.org/D53182.
Modified:
zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
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=344753&r1=344752&r2=344753&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh Thu Oct 18 12:34:47 2018
@@ -44,6 +44,7 @@ function configure_android { # ARCH trip
local ANDROID_LIBRARY_OUTPUT_DIR=$(ls -d $ROOT/llvm_build64/lib/clang/* | tail -1)
local ANDROID_EXEC_OUTPUT_DIR=$ROOT/llvm_build64/bin
local ANDROID_FLAGS="--target=$_triple --sysroot=$ANDROID_TOOLCHAIN/sysroot -B$ANDROID_TOOLCHAIN"
+ local ANDROID_CXX_FLAGS="$ANDROID_FLAGS -stdlib=libstdc++"
# Always clobber android build tree.
# It has a hidden dependency on clang (through CXX) which is not known to
@@ -59,7 +60,7 @@ function configure_android { # ARCH trip
-DCMAKE_CXX_COMPILER=$ROOT/llvm_build64/bin/clang++ \
-DCMAKE_ASM_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_C_FLAGS="$ANDROID_FLAGS" \
- -DCMAKE_CXX_FLAGS="$ANDROID_FLAGS" \
+ -DCMAKE_CXX_FLAGS="$ANDROID_CXX_FLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="-pie" \
-DCMAKE_SKIP_RPATH=ON \
-DLLVM_BUILD_RUNTIME=OFF \
@@ -76,7 +77,7 @@ function configure_android { # ARCH trip
-DCOMPILER_RT_ENABLE_WERROR=ON \
-DCMAKE_ASM_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_C_FLAGS="$ANDROID_FLAGS" \
- -DCMAKE_CXX_FLAGS="$ANDROID_FLAGS" \
+ -DCMAKE_CXX_FLAGS="$ANDROID_CXX_FLAGS" \
-DANDROID=1 \
-DCOMPILER_RT_TEST_COMPILER_CFLAGS="$ANDROID_FLAGS" \
-DCOMPILER_RT_TEST_TARGET_TRIPLE=$_triple \
More information about the llvm-commits
mailing list