[zorg] r344640 - [Zorg] Use CMAKE_ASM_FLAGS with compiler-rt.
Dan Albert via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 12:05:50 PDT 2018
Author: danalbert
Date: Tue Oct 16 12:05:49 2018
New Revision: 344640
URL: http://llvm.org/viewvc/llvm-project?rev=344640&view=rev
Log:
[Zorg] Use CMAKE_ASM_FLAGS with compiler-rt.
Summary:
Right now this script works because add_compiler_rt_object_libraries
unconditionally adds CMAKE_CXX_FLAGS to every target, even though
CMake will do this automatically for C++ files. Doing this breaks
when using -Werror=unused-command-line-argument and when
CMAKE_CXX_FLAGS contains flags that are not valid for building C or
assembly code (like -stdlib).
This change is needed because I'm changing the default -stdlib for
Android, and this build needs to use an explicit stdlib to revert to
the old behavior since it uses an old NDK.
This change needs to land in four parts:
1. This change: use CMAKE_ASM_FLAGS.
2. Remove the explicit CMAKE_CXX_FLAGS from
add_compiler_rt_object_libraries.
3. Reland the change to use an explicit -stdlib.
4. Reland the change to make Android default to -stdlib=libc++.
Reviewers: eugenis
Reviewed By: eugenis
Subscribers: srhines, dberris, llvm-commits
Tags: #zorg
Differential Revision: https://reviews.llvm.org/D53301
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=344640&r1=344639&r2=344640&view=diff
==============================================================================
--- zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh (original)
+++ zorg/trunk/zorg/buildbot/builders/sanitizers/buildbot_android_functions.sh Tue Oct 16 12:05:49 2018
@@ -57,6 +57,7 @@ function configure_android { # ARCH trip
-DLLVM_ENABLE_WERROR=OFF \
-DCMAKE_C_COMPILER=$ROOT/llvm_build64/bin/clang \
-DCMAKE_CXX_COMPILER=$ROOT/llvm_build64/bin/clang++ \
+ -DCMAKE_ASM_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_C_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_CXX_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_EXE_LINKER_FLAGS="-pie" \
@@ -73,6 +74,7 @@ function configure_android { # ARCH trip
-DCOMPILER_RT_BUILD_BUILTINS=OFF \
-DCOMPILER_RT_INCLUDE_TESTS=ON \
-DCOMPILER_RT_ENABLE_WERROR=ON \
+ -DCMAKE_ASM_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_C_FLAGS="$ANDROID_FLAGS" \
-DCMAKE_CXX_FLAGS="$ANDROID_FLAGS" \
-DANDROID=1 \
More information about the llvm-commits
mailing list