Skip to content

Respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET if it is set in the environment #3552

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

abertelrud
Copy link
Contributor

This makes the SwiftPM manifest respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET in preference over the existing SWIFTPM_MACOS_DEPLOYMENT_TARGET, which is still used as fallback.

Motivation:

Rather than having every unrelated package use SWIFTPM_MACOS_DEPLOYMENT_TARGET, we have started to use the more neutral SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET (see for example swiftlang/swift-tools-support-core#220) so that one setting can control all the packages that make up the toolchain.

Modifications:

  • modify Package.swift to first look for SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET

Result:

SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET will be respected if it is set, otherwise SWIFTPM_MACOS_DEPLOYMENT_TARGET will be respected, otherwise the default is used.

…or a while still respect SWIFTPM_MACOS_DEPLOYMENT_TARGET as fallback)
@abertelrud abertelrud self-assigned this Jun 15, 2021
@abertelrud abertelrud added the ready Author believes the PR is ready to be merged & any feedback has been addressed label Jun 15, 2021
@abertelrud
Copy link
Contributor Author

@swift-ci please smoke test

@neonichu
Copy link
Contributor

I think we can just get rid of the variable at this point, since the fallback is 10.15 and the value that we are setting it in the bootstrap script is also 10.15

This was really only meant as a temporary measure while we were still supporting 10.10 and I forgot to clean it up as we moved to 10.15 by default.

@abertelrud
Copy link
Contributor Author

I think we can just get rid of the variable at this point, since the fallback is 10.15 and the value that we are setting it in the bootstrap script is also 10.15

This was really only meant as a temporary measure while we were still supporting 10.10 and I forgot to clean it up as we moved to 10.15 by default.

Sounds good. Opened #3557 and will close this one.

@abertelrud abertelrud closed this Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready Author believes the PR is ready to be merged & any feedback has been addressed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants