[PATCH] D53182: [Zorg] Explicitly use `-stdlib=libstdc++` for Android.

Dan Albert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 11 16:11:58 PDT 2018


danalbert created this revision.
danalbert added a reviewer: eugenis.
danalbert added a project: Zorg.
Herald added a subscriber: srhines.

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).


https://reviews.llvm.org/D53182

Files:
  zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh


Index: zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
===================================================================
--- zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
+++ zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh
@@ -43,7 +43,7 @@
   local ANDROID_TOOLCHAIN=$ROOT/android_ndk/standalone-$_arch
   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_FLAGS="--target=$_triple -stdlib=libstdc++ --sysroot=$ANDROID_TOOLCHAIN/sysroot -B$ANDROID_TOOLCHAIN"
 
   # Always clobber android build tree.
   # It has a hidden dependency on clang (through CXX) which is not known to


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53182.169337.patch
Type: text/x-patch
Size: 837 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181011/f42da546/attachment.bin>


More information about the llvm-commits mailing list