Skip to content

Commit e1bff80

Browse files
committed
[build] Do not override macOS deployment target when macCatalyst is enabled
Cxx.swiftmodule should built with a macOS deployment target set to 10.9, the minimum possible version. Since we enabled macCatalyst for this target, it inadvertently started being built with a deployment target set to 13.0, which is too new and is causing build errors in certain projects. This change makes sure that for Swift targets within the Swift project that explicitly specify `DEPLOYMENT_VERSION_OSX`, the macCatalyst build logic doesn't silently discard this flag. rdar://133008827
1 parent 8879ae5 commit e1bff80

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

cmake/modules/macCatalystUtils.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ function(get_target_triple target_out_var target_variant_out_var sdk arch)
7878
elseif(maccatalyst_build_flavor STREQUAL "macos-like")
7979
# Use the default macOS triple.
8080
elseif(maccatalyst_build_flavor STREQUAL "zippered")
81-
set(target "${arch}-apple-macosx${SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX}")
81+
set(target "${arch}-apple-macosx${deployment_version}")
8282
set(target_variant "${arch}-apple-ios${SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST}-macabi")
8383
elseif(maccatalyst_build_flavor STREQUAL "unzippered-twin")
8484
# Use the default triple for now
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %target-build-swift %s -cxx-interoperability-mode=default -target arm64-apple-macos11.0
2+
3+
// REQUIRES: OS=macosx
4+
5+
import Cxx
6+
7+
public func takesCxxType(_ s: some CxxSequence) {}

0 commit comments

Comments
 (0)