mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[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
This commit is contained in:
@@ -78,7 +78,7 @@ function(get_target_triple target_out_var target_variant_out_var sdk arch)
|
||||
elseif(maccatalyst_build_flavor STREQUAL "macos-like")
|
||||
# Use the default macOS triple.
|
||||
elseif(maccatalyst_build_flavor STREQUAL "zippered")
|
||||
set(target "${arch}-apple-macosx${SWIFT_DARWIN_DEPLOYMENT_VERSION_OSX}")
|
||||
set(target "${arch}-apple-macosx${deployment_version}")
|
||||
set(target_variant "${arch}-apple-ios${SWIFT_DARWIN_DEPLOYMENT_VERSION_MACCATALYST}-macabi")
|
||||
elseif(maccatalyst_build_flavor STREQUAL "unzippered-twin")
|
||||
# Use the default triple for now
|
||||
|
||||
7
test/Interop/Cxx/stdlib/overlay-backdeployment.swift
Normal file
7
test/Interop/Cxx/stdlib/overlay-backdeployment.swift
Normal file
@@ -0,0 +1,7 @@
|
||||
// RUN: %target-build-swift %s -cxx-interoperability-mode=default -target arm64-apple-macos11.0
|
||||
|
||||
// REQUIRES: OS=macosx
|
||||
|
||||
import Cxx
|
||||
|
||||
public func takesCxxType(_ s: some CxxSequence) {}
|
||||
Reference in New Issue
Block a user