From 56e3827e92c7e25775915bfe158388d197c5c6be Mon Sep 17 00:00:00 2001 From: Chris Bieneman Date: Mon, 25 Jul 2016 20:25:38 +0000 Subject: [PATCH] Revert "Enable cross-compilation across architectures on android" This reverts commit r276333. As I commented in the review (https://reviews.llvm.org/D22415), this change isn't needed because CMAKE_C_FLAGS is implicitly added by CMake to the command line for all C source files. With this patch enabled CMAKE_C_FLAGS is duplicated on all C sources, and applied to ASM sources, which is not ideal. I sent an email about this to llvm-commits on the commit thread. I suspect the problem the patch author was actually seeing is that CMAKE_C_FLAGS isn't applied to ASM files, and the builtins library has quite a few of those. The correct solution there is to specify CMAKE_ASM_FLAGS with whatever flags need to be passed to the compiler when compiling ASM files. If there are other problems with flag propagation, please let me know. llvm-svn: 276683 --- compiler-rt/lib/builtins/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt index 274b0b4..d5a1efe 100644 --- a/compiler-rt/lib/builtins/CMakeLists.txt +++ b/compiler-rt/lib/builtins/CMakeLists.txt @@ -413,7 +413,7 @@ else () STATIC ARCHS ${arch} SOURCES ${${arch}_SOURCES} - CFLAGS ${maybe_stdc99} ${CMAKE_C_FLAGS} + CFLAGS ${maybe_stdc99} PARENT_TARGET builtins) endif () endforeach () -- 2.7.4