diff options
author | Chris Bieneman <beanz@apple.com> | 2015-09-29 23:21:09 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-09-29 23:21:09 +0000 |
commit | 9a9de764158e69caf8a91eadc4ef25bb29f16697 (patch) | |
tree | 6c25dc9a96a0e4ddcbd9e821825dd449349f7b31 | |
parent | b71c47332cb99733559247823bfcb60085e7ca30 (diff) | |
download | compiler-rt-9a9de764158e69caf8a91eadc4ef25bb29f16697.tar.gz |
[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.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@248853 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | cmake/Modules/CompilerRTDarwinUtils.cmake | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake index 474c9fdae..12c174796 100644 --- a/cmake/Modules/CompilerRTDarwinUtils.cmake +++ b/cmake/Modules/CompilerRTDarwinUtils.cmake @@ -338,6 +338,11 @@ function(darwin_add_embedded_builtin_libraries) 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_libraries) 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}) |