[compiler-rt] r276683 - Revert "Enable cross-compilation across architectures on android"

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 25 13:25:38 PDT 2016


Author: cbieneman
Date: Mon Jul 25 15:25:38 2016
New Revision: 276683

URL: http://llvm.org/viewvc/llvm-project?rev=276683&view=rev
Log:
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.

Modified:
    compiler-rt/trunk/lib/builtins/CMakeLists.txt

Modified: compiler-rt/trunk/lib/builtins/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/builtins/CMakeLists.txt?rev=276683&r1=276682&r2=276683&view=diff
==============================================================================
--- compiler-rt/trunk/lib/builtins/CMakeLists.txt (original)
+++ compiler-rt/trunk/lib/builtins/CMakeLists.txt Mon Jul 25 15:25:38 2016
@@ -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 ()




More information about the llvm-commits mailing list