[compiler-rt] r248853 - [CMake] [macho_embedded] We need to set some extra flags when building the macho_embedded builtins.

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 29 16:21:10 PDT 2015


Author: cbieneman
Date: Tue Sep 29 18:21:09 2015
New Revision: 248853

URL: http://llvm.org/viewvc/llvm-project?rev=248853&view=rev
Log:
[CMake] [macho_embedded] We need to set some extra flags when building the macho_embedded builtins.

If we don't specify the arm target the float ABI compiler flags get ignored.

Modified:
    compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake

Modified: compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake?rev=248853&r1=248852&r2=248853&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Tue Sep 29 18:21:09 2015
@@ -338,6 +338,11 @@ function(darwin_add_embedded_builtin_lib
 
   set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR
     ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded)
+    
+  set(CFLAGS_armv7 "-target thumbv7-apple-darwin-eabi")
+  set(CFLAGS_armv7em "-target thumbv7-apple-darwin-eabi")
+  set(CFLAGS_armv7m "-target thumbv7-apple-darwin-eabi")
+  set(CFLAGS_i386 "-march=pentium")
 
   set(DARWIN_SOFT_FLOAT_ARCHS armv6m armv7m armv7em armv7)
   set(DARWIN_HARD_FLOAT_ARCHS armv7em armv7 i386 x86_64)
@@ -378,7 +383,7 @@ function(darwin_add_embedded_builtin_lib
                               OS macho_embedded
                               ARCH ${arch}
                               SOURCES ${${arch}_filtered_sources}
-                              CFLAGS -arch ${arch} ${${type}_FLAG} ${${float_type}_FLOAT_FLAG}
+                              CFLAGS -arch ${arch} ${${type}_FLAG} ${${float_type}_FLOAT_FLAG} ${CFLAGS_${arch}}
                               PARENT_TARGET builtins)
       endforeach()
       foreach(lib ${macho_embedded_${lib_suffix}_libs})




More information about the llvm-commits mailing list