summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Bieneman <beanz@apple.com>2015-11-09 23:05:05 +0000
committerChris Bieneman <beanz@apple.com>2015-11-09 23:05:05 +0000
commit1ad0146498b9b914523515853f6033f453f5cce2 (patch)
treeed6fb8fc190add57948004b2ca0dc04904550a87
parent4e3b36947b4f97b740e831b5b64f6b04ff978f65 (diff)
downloadbcm5719-llvm-1ad0146498b9b914523515853f6033f453f5cce2.tar.gz
bcm5719-llvm-1ad0146498b9b914523515853f6033f453f5cce2.zip
[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. llvm-svn: 252525
-rw-r--r--compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake14
1 files changed, 13 insertions, 1 deletions
diff --git a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake b/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
index 97b0ea40278..1b1143306e2 100644
--- a/compiler-rt/cmake/Modules/CompilerRTDarwinUtils.cmake
+++ b/compiler-rt/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)
OpenPOWER on IntegriCloud