-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[cxx-interop] Lower macOS deployment target version for the Cxx module #69512
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci please smoke test |
@swift-ci please test |
@egorzhdan what about the CxxStdlib module? |
The CMake flag `DEPLOYMENT_VERSION_OSX` is currently only passed to the C compiler. This change makes sure it is also passed to the Swift compiler, e.g. when building Swift-only targets like Cxx or CxxStdlib. rdar://117699474
The Cxx module does not rely on any modern OS features. It can be deployed to older macOS versions. rdar://117699474
e12339f
to
00cdb66
Compare
Right, we should apply the same CMake flag to CxxStdlib as well |
@swift-ci please smoke test |
@swift-ci please test |
@swift-ci please test Windows |
@egorzhdan please pick this to 5.10 as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mechanically, yeah, I think this drills all of the appropriate holes to plumb through a different deployment target. Will we need to be able to alter the deployment target on other platforms too, or is this guaranteed to only be a macOS thing?
@@ -236,6 +237,10 @@ function(_add_target_variant_swift_compile_flags | |||
|
|||
if("${sdk}" IN_LIST SWIFT_DARWIN_PLATFORMS) | |||
set(sdk_deployment_version "${SWIFT_SDK_${sdk}_DEPLOYMENT_VERSION}") | |||
if("${sdk}" STREQUAL "OSX" AND DEFINED VARIANT_DEPLOYMENT_VERSION_OSX) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will we need this configuration for each Darwin platform, or only macOS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might potentially need this on other Darwin platforms in the future, but for now we only expect to use this for macOS. I can add the corresponding CMake logic for iOS, etc. if you think it's worth having it in tree.
…rces See #69512 rdar://117699474
The Cxx module does not rely on any modern OS features. It can be deployed to older macOS versions.
rdar://117699474