Skip to content

Commit a859ebe

Browse files
authored
Merge pull request #85969 from glessard/rdar163874201-libSwiftCompatibilitySpan-buildfix
[cmake] fix libswiftCompatibilitySpan for maccatalyst builds
2 parents f092709 + 4fa4ec8 commit a859ebe

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

stdlib/toolchain/CompatibilitySpan/CMakeLists.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED SWIFT_STDLIB_LIBRARY_BUILD_TY
22

33
set(library_name "swiftCompatibilitySpan")
44

5+
# The correct fix would be to add this to the following to the invocation of add_swift_target_library
6+
# DEPLOYMENT_VERSION_MACCATALYST ${COMPATIBILITY_MINIMUM_DEPLOYMENT_VERSION_MACCATALYST}
7+
# but the underlying logic takes the deployment version from the cache instead
8+
# so for now we override those values locally
9+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX "10.14.4")
10+
set(SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST "13.1")
11+
512
add_swift_target_library("${library_name}" ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
613
FakeStdlib.swift
714
../../public/core/Span/MutableRawSpan.swift
@@ -13,8 +20,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED SWIFT_STDLIB_LIBRARY_BUILD_TY
1320

1421
TARGET_SDKS ${SWIFT_APPLE_PLATFORMS}
1522

16-
LINK_FLAGS "${SWIFT_RUNTIME_SWIFT_LINK_FLAGS}"
17-
1823
SWIFT_COMPILE_FLAGS
1924
${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
2025
-parse-stdlib
@@ -28,7 +33,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND DEFINED SWIFT_STDLIB_LIBRARY_BUILD_TY
2833
DEPLOYMENT_VERSION_TVOS "12.2"
2934
DEPLOYMENT_VERSION_WATCHOS "5.2"
3035
DEPLOYMENT_VERSION_XROS "1.0"
31-
DEPLOYMENT_VERSION_MACCATALYST "13.1"
3236

3337
MACCATALYST_BUILD_FLAVOR "zippered"
3438

0 commit comments

Comments
 (0)