[5.9 π][Explicit Modules] Handle re-mapped platform versions when specifying SDK-aligned -clang-target
on Darwin platforms
#1395
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cherry-pick of #1394
β’ Release: 5.9
β’ Explanation: #1322 introduced functionality to the driver where
-clang-target
for all Clang module dependencies is set to the target SDK deployment target on Darwin platforms. The original implementation missed the case of targeting platforms with an SDK-specified OS version re-map, causing incorrect versions to be used in those cases, in Explicit Module Builds.β’ Reviewed by: @xymus
β’ Scope of Issue: Explicitly-built module dependencies of builds targeting platforms with a version remap (e.g. MacCatalyst) use incorrect/unexpected target OS versions for Clang module dependencies.
β’ Risk: Low. This change modifies code that does not run on default (Implicit Modules) compilation code-path, and the change itself is straight-forward and small, for affected code-paths.
β’ Testing: Automated tests added to the driver test suite.
Resolves rdar://108288193