[compiler-rt] r257544 - [CMake] Adding experimental support for tvOS and watchOS
Chris Bieneman via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 12 15:51:03 PST 2016
Author: cbieneman
Date: Tue Jan 12 17:51:03 2016
New Revision: 257544
URL: http://llvm.org/viewvc/llvm-project?rev=257544&view=rev
Log:
[CMake] Adding experimental support for tvOS and watchOS
Summary:
* Refactored the iOS config-ix.cmake code to be a more compact loop over supported embedded platforms.
* Added watchOS and tvOS as experimental platforms, they don't currently build so they are disabled by default
Reviewers: zaks.anna, kubabrecka, samsonov
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D16119
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=257544&r1=257543&r2=257544&view=diff
==============================================================================
--- compiler-rt/trunk/cmake/config-ix.cmake (original)
+++ compiler-rt/trunk/cmake/config-ix.cmake Tue Jan 12 17:51:03 2016
@@ -299,10 +299,44 @@ if(APPLE)
endif()
option(COMPILER_RT_ENABLE_IOS "Enable building for iOS - Experimental" Off)
+ option(COMPILER_RT_ENABLE_WATCHOS "Enable building for watchOS - Experimental" Off)
+ option(COMPILER_RT_ENABLE_TVOS "Enable building for tvOS - Experimental" Off)
find_darwin_sdk_dir(DARWIN_osx_SYSROOT macosx)
find_darwin_sdk_dir(DARWIN_iossim_SYSROOT iphonesimulator)
find_darwin_sdk_dir(DARWIN_ios_SYSROOT iphoneos)
+ find_darwin_sdk_dir(DARWIN_watchossim_SYSROOT watchsimulator)
+ find_darwin_sdk_dir(DARWIN_watchos_SYSROOT watchos)
+ find_darwin_sdk_dir(DARWIN_tvossim_SYSROOT appletvsimulator)
+ find_darwin_sdk_dir(DARWIN_tvos_SYSROOT appletvos)
+
+ if(COMPILER_RT_ENABLE_IOS)
+ list(APPEND DARWIN_EMBEDDED_PLATFORMS ios)
+ set(DARWIN_ios_MIN_VER_FLAG -miphoneos-version-min)
+ set(DARWIN_ios_SANITIZER_MIN_VER_FLAG
+ ${DARWIN_ios_MIN_VER_FLAG}=7.0)
+ set(DARWIN_ios_BUILTIN_MIN_VER 6.0)
+ set(DARWIN_ios_BUILTIN_MIN_VER_FLAG
+ ${DARWIN_ios_MIN_VER_FLAG}=${DARWIN_ios_BUILTIN_MIN_VER})
+ endif()
+ if(COMPILER_RT_ENABLE_WATCHOS)
+ list(APPEND DARWIN_EMBEDDED_PLATFORMS watchos)
+ set(DARWIN_watchos_MIN_VER_FLAG -mwatchos-version-min)
+ set(DARWIN_watchos_SANITIZER_MIN_VER_FLAG
+ ${DARWIN_watchos_MIN_VER_FLAG}=2.0)
+ set(DARWIN_watchos_BUILTIN_MIN_VER 2.0)
+ set(DARWIN_watchos_BUILTIN_MIN_VER_FLAG
+ ${DARWIN_watchos_MIN_VER_FLAG}=${DARWIN_watchos_BUILTIN_MIN_VER})
+ endif()
+ if(COMPILER_RT_ENABLE_TVOS)
+ list(APPEND DARWIN_EMBEDDED_PLATFORMS tvos)
+ set(DARWIN_tvos_MIN_VER_FLAG -mtvos-version-min)
+ set(DARWIN_tvos_SANITIZER_MIN_VER_FLAG
+ ${DARWIN_tvos_MIN_VER_FLAG}=9.0)
+ set(DARWIN_tvos_BUILTIN_MIN_VER 9.0)
+ set(DARWIN_tvos_BUILTIN_MIN_VER_FLAG
+ ${DARWIN_tvos_MIN_VER_FLAG}=${DARWIN_tvos_BUILTIN_MIN_VER})
+ endif()
# Note: In order to target x86_64h on OS X the minimum deployment target must
# be 10.8 or higher.
@@ -384,62 +418,62 @@ if(APPLE)
list(APPEND BUILTIN_SUPPORTED_OS 10.4)
endif()
- if(DARWIN_iossim_SYSROOT)
- set(DARWIN_iossim_CFLAGS
- ${DARWIN_COMMON_CFLAGS}
- -mios-simulator-version-min=7.0
- -isysroot ${DARWIN_iossim_SYSROOT})
- set(DARWIN_iossim_LINKFLAGS
- ${DARWIN_COMMON_LINKFLAGS}
- -mios-simulator-version-min=7.0
- -isysroot ${DARWIN_iossim_SYSROOT})
- set(DARWIN_iossim_BUILTIN_MIN_VER 6.0)
- set(DARWIN_iossim_BUILTIN_MIN_VER_FLAG
- -mios-simulator-version-min=${DARWIN_iossim_BUILTIN_MIN_VER})
-
- 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)
- list(APPEND PROFILE_SUPPORTED_OS iossim)
+ foreach(platform ${DARWIN_EMBEDDED_PLATFORMS})
+ if(DARWIN_${platform}sim_SYSROOT)
+ set(DARWIN_${platform}sim_CFLAGS
+ ${DARWIN_COMMON_CFLAGS}
+ ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
+ -isysroot ${DARWIN_iossim_SYSROOT})
+ set(DARWIN_${platform}sim_LINKFLAGS
+ ${DARWIN_COMMON_LINKFLAGS}
+ ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
+ -isysroot ${DARWIN_${platform}sim_SYSROOT})
+ set(DARWIN_${platform}sim_BUILTIN_MIN_VER
+ ${DARWIN_${platform}_BUILTIN_MIN_VER})
+ set(DARWIN_${platform}sim_BUILTIN_MIN_VER_FLAG
+ ${DARWIN_${platform}_BUILTIN_MIN_VER_FLAG})
+
+ set(DARWIN_${platform}sim_SKIP_CC_KEXT On)
+ darwin_test_archs(${platform}sim
+ DARWIN_${platform}sim_ARCHS
+ ${toolchain_arches})
+ message(STATUS "${platform} Simulator supported arches: ${DARWIN_${platform}sim_ARCHS}")
+ if(DARWIN_iossim_ARCHS)
+ list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform}sim)
+ list(APPEND BUILTIN_SUPPORTED_OS ${platform}sim)
+ list(APPEND PROFILE_SUPPORTED_OS ${platform}sim)
+ endif()
+ foreach(arch ${DARWIN_${platform}sim_ARCHS})
+ list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
+ set(CAN_TARGET_${arch} 1)
+ endforeach()
endif()
- foreach(arch ${DARWIN_iossim_ARCHS})
- list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
- set(CAN_TARGET_${arch} 1)
- endforeach()
- endif()
- if(DARWIN_ios_SYSROOT AND COMPILER_RT_ENABLE_IOS)
- set(DARWIN_ios_CFLAGS
- ${DARWIN_COMMON_CFLAGS}
- -miphoneos-version-min=7.0
- -isysroot ${DARWIN_ios_SYSROOT})
- set(DARWIN_ios_LINKFLAGS
- ${DARWIN_COMMON_LINKFLAGS}
- -miphoneos-version-min=7.0
- -isysroot ${DARWIN_ios_SYSROOT})
- set(DARWIN_ios_BUILTIN_MIN_VER 6.0)
- set(DARWIN_ios_BUILTIN_MIN_VER_FLAG
- -miphoneos-version-min=${DARWIN_ios_BUILTIN_MIN_VER})
-
- 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)
+ if(DARWIN_${platform}_SYSROOT)
+ set(DARWIN_${platform}_CFLAGS
+ ${DARWIN_COMMON_CFLAGS}
+ ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
+ -isysroot ${DARWIN_${platform}_SYSROOT})
+ set(DARWIN_${platform}_LINKFLAGS
+ ${DARWIN_COMMON_LINKFLAGS}
+ ${DARWIN_${platform}_SANITIZER_MIN_VER_FLAG}
+ -isysroot ${DARWIN_${platform}_SYSROOT})
+
+ darwin_test_archs(${platform}
+ DARWIN_${platform}_ARCHS
+ ${toolchain_arches})
+ message(STATUS "${platform} supported arches: ${DARWIN_${platform}_ARCHS}")
+ if(DARWIN_${platform}_ARCHS)
+ list(APPEND SANITIZER_COMMON_SUPPORTED_OS ${platform})
+ list(APPEND BUILTIN_SUPPORTED_OS ${platform})
+ list(APPEND PROFILE_SUPPORTED_OS ${platform})
+ endif()
+ foreach(arch ${DARWIN_${platform}_ARCHS})
+ list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
+ set(CAN_TARGET_${arch} 1)
+ endforeach()
endif()
- foreach(arch ${DARWIN_ios_ARCHS})
- list(APPEND COMPILER_RT_SUPPORTED_ARCH ${arch})
- set(CAN_TARGET_${arch} 1)
- endforeach()
- endif()
+ endforeach()
endif()
# for list_union
More information about the llvm-commits
mailing list