Revert "Enable cross-compilation across architectures on android"
authorChris Bieneman <beanz@apple.com>
Mon, 25 Jul 2016 20:25:38 +0000 (20:25 +0000)
committerChris Bieneman <beanz@apple.com>
Mon, 25 Jul 2016 20:25:38 +0000 (20:25 +0000)
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

index 274b0b4..d5a1efe 100644 (file)
@@ -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 ()