Files
swift-mirror/stdlib/toolchain/Compatibility56/CMakeLists.txt
Artem Chikin 1f14158a1d Introduce VisionOS Platform
This change introduces a new compilation target platform to the Swift compiler - visionOS.

- Changes to the compiler build infrastrucuture to support building compiler-adjacent artifacts and test suites for the new target.
- Addition of the new platform kind definition.
- Support for the new platform in language constructs such as compile-time availability annotations or runtime OS version queries.
- Utilities to read out Darwin platform SDK info containing platform mapping data.
- Utilities to support re-mapping availability annotations from iOS to visionOS (e.g. 'updateIntroducedPlatformForFallback', 'updateDeprecatedPlatformForFallback', 'updateObsoletedPlatformForFallback').
- Additional tests exercising platform-specific availability handling and availability re-mapping fallback code-path.
- Changes to existing test suite to accomodate the new platform.
2024-04-10 09:38:02 -07:00

53 lines
1.7 KiB
CMake

set(library_name "swiftCompatibility56")
include_directories("include/" "${SWIFT_STDLIB_SOURCE_DIR}")
add_compile_definitions(SWIFT_COMPATIBILITY56)
add_swift_target_library("${library_name}" STATIC
Overrides.cpp
Concurrency/Task.cpp
Concurrency/TaskLocal.cpp
Concurrency/TaskStatus.cpp
Concurrency/Error.cpp
Concurrency/Actor.cpp
Concurrency/AsyncLet.cpp
Concurrency/ThreadSanitizer.cpp
Concurrency/TaskAlloc.cpp
Concurrency/MutexPThread.cpp
Runtime/Exclusivity.cpp
TARGET_SDKS ${SWIFT_DARWIN_PLATFORMS}
C_COMPILE_FLAGS
${CXX_COMPILE_FLAGS}
"-D__STDC_WANT_LIB_EXT1__=1"
"-DSWIFT_THREADING_IS_COMPATIBILITY_LIBRARY"
LINK_FLAGS ${CXX_LINK_FLAGS}
INCORPORATE_OBJECT_LIBRARIES swiftCompatibilityThreading
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
DEPLOYMENT_VERSION_OSX ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_OSX}
DEPLOYMENT_VERSION_IOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_IOS}
DEPLOYMENT_VERSION_TVOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_TVOS}
DEPLOYMENT_VERSION_WATCHOS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_WATCHOS}
DEPLOYMENT_VERSION_XROS ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_XROS}
MACCATALYST_BUILD_FLAVOR "zippered"
INSTALL_IN_COMPONENT compiler
INSTALL_WITH_SHARED)
# FIXME: We need a more flexible mechanism to add lipo targets generated by
# add_swift_target_library to the ALL target. Until then this hack is necessary
# to ensure these libraries build.
foreach(sdk ${SWIFT_SDKS})
set(target_name "${library_name}-${SWIFT_SDK_${sdk}_LIB_SUBDIR}")
if(NOT TARGET "${target_name}")
continue()
endif()
set_target_properties("${target_name}"
PROPERTIES
EXCLUDE_FROM_ALL FALSE)
endforeach()