diff options
author | Chris Bieneman <beanz@apple.com> | 2015-11-09 23:05:05 +0000 |
---|---|---|
committer | Chris Bieneman <beanz@apple.com> | 2015-11-09 23:05:05 +0000 |
commit | 5be03d36ed643aab0d9dbef3b61356e0b346968b (patch) | |
tree | 13cd3cd5831b782d275dc1f0ce47a929323e6ab6 /cmake | |
parent | c3825cb83ded0b710b40add0c95adfebed544902 (diff) | |
download | compiler-rt-5be03d36ed643aab0d9dbef3b61356e0b346968b.tar.gz |
[CMake] [macho_embedded] Check to make sure the compiler supports the architectures before generating build targets
If we don't check the compiler's capabilities we end up generating build targets that the compiler might not be able to build.
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@252525 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'cmake')
-rw-r--r-- | cmake/Modules/CompilerRTDarwinUtils.cmake | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/cmake/Modules/CompilerRTDarwinUtils.cmake b/cmake/Modules/CompilerRTDarwinUtils.cmake index 97b0ea402..1b1143306 100644 --- a/cmake/Modules/CompilerRTDarwinUtils.cmake +++ b/cmake/Modules/CompilerRTDarwinUtils.cmake @@ -360,7 +360,19 @@ function(darwin_add_embedded_builtin_libraries) set(PIC_FLAG_ -fPIC) set(STATIC_FLAG -static) - set(DARWIN_macho_embedded_ARCHS armv6m armv7m armv7em armv7 i386 x86_64) + darwin_test_archs(ios + DARWIN_macho_embedded_ios_ARCHS + armv6m armv7m armv7em armv7) + darwin_test_archs(osx + DARWIN_macho_embedded_osx_ARCHS + i386 x86_64) + + list(APPEND DARWIN_macho_embedded_ARCHS + ${DARWIN_macho_embedded_ios_ARCHS} ${DARWIN_macho_embedded_osx_ARCHS}) + + if(NOT DARWIN_macho_embedded_ARCHS) + return() + endif() set(DARWIN_macho_embedded_LIBRARY_OUTPUT_DIR ${COMPILER_RT_OUTPUT_DIR}/lib/macho_embedded) |