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

llvm-svn: 249054
This commit is contained in:
Chris Bieneman 2015-10-01 18:58:59 +00:00
parent ced56e6eca
commit 291723353a
1 changed files with 13 additions and 6 deletions

View File

@ -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)