[compiler-rt] r249054 - [CMake] Only add an OS to the supported OS lists if there are supported architectures for that OS.

Chris Bieneman via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 1 11:59:00 PDT 2015


Author: cbieneman
Date: Thu Oct  1 13:58:59 2015
New Revision: 249054

URL: http://llvm.org/viewvc/llvm-project?rev=249054&view=rev
Log:
[CMake] Only add an OS to the supported OS lists if there are supported architectures for that OS.

Modified:
    compiler-rt/trunk/cmake/config-ix.cmake

Modified: compiler-rt/trunk/cmake/config-ix.cmake
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=249054&r1=249053&r2=249054&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Thu Oct  1 13:58:59 2015
@@ -348,10 +348,13 @@ if(APPLE)
     set(DARWIN_10.4_BUILTIN_MIN_VER_FLAG
         -mmacosx-version-min=${DARWIN_10.4_BUILTIN_MIN_VER})
     set(DARWIN_10.4_SKIP_CC_KEXT On)
-    list(APPEND BUILTIN_SUPPORTED_OS 10.4)
     darwin_test_archs(10.4
       DARWIN_10.4_ARCHS
       ${toolchain_arches})
+    message(STATUS "OSX 10.4 supported arches: ${DARWIN_10.4_ARCHS}")
+    if(DARWIN_10.4_ARCHES)
+      list(APPEND BUILTIN_SUPPORTED_OS 10.4)
+    endif()
 
     if(DARWIN_iossim_SYSROOT)
       set(DARWIN_iossim_CFLAGS
@@ -366,13 +369,15 @@ if(APPLE)
       set(DARWIN_iossim_BUILTIN_MIN_VER_FLAG
         -mios-simulator-version-min=${DARWIN_iossim_BUILTIN_MIN_VER})
 
-      list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
-      list(APPEND BUILTIN_SUPPORTED_OS iossim)
       set(DARWIN_iossim_SKIP_CC_KEXT On)
       darwin_test_archs(iossim
         DARWIN_iossim_ARCHS
         ${toolchain_arches})
       message(STATUS "iOS Simulator supported arches: ${DARWIN_iossim_ARCHS}")
+      if(DARWIN_iossim_ARCHS)
+        list(APPEND SANITIZER_COMMON_SUPPORTED_OS iossim)
+        list(APPEND BUILTIN_SUPPORTED_OS iossim)
+      endif()
       foreach(arch ${DARWIN_iossim_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
         set(CAN_TARGET_${arch} 1)
@@ -392,13 +397,15 @@ if(APPLE)
       set(DARWIN_ios_BUILTIN_MIN_VER_FLAG
         -miphoneos-version-min=${DARWIN_ios_BUILTIN_MIN_VER})
 
-      list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios)
-      list(APPEND BUILTIN_SUPPORTED_OS ios)
-      list(APPEND PROFILE_SUPPORTED_OS ios)
       darwin_test_archs(ios
         DARWIN_ios_ARCHS
         ${toolchain_arches})
       message(STATUS "iOS supported arches: ${DARWIN_ios_ARCHS}")
+      if(DARWIN_ios_ARCHS)
+        list(APPEND SANITIZER_COMMON_SUPPORTED_OS ios)
+        list(APPEND BUILTIN_SUPPORTED_OS ios)
+        list(APPEND PROFILE_SUPPORTED_OS ios)
+      endif()
       foreach(arch ${DARWIN_ios_ARCHS})
         list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
         set(CAN_TARGET_${arch} 1)




More information about the llvm-commits mailing list