[compiler-rt] r252525 - [CMake] [macho_embedded] Check to make sure the compiler supports the architectures before generating build targets
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 9 15:05:06 PST 2015
Author: cbieneman
Date: Mon Nov 9 17:05:05 2015
New Revision: 252525
URL: http://llvm.org/viewvc/llvm-project?rev=252525&view=rev
Log:
[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.
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=252525&r1=252524&r2=252525&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake (original)
+++ compiler-rt/trunk/cmake/Modules/CompilerRTDarwinUtils.cmake Mon Nov 9 17:05:05 2015
@@ -360,7 +360,19 @@ function(darwin_add_embedded_builtin_lib
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)
More information about the llvm-commits
mailing list