Skip to content
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

Respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET if it is set in the environment #220

Merged
merged 1 commit into from
Jun 9, 2021

Conversation

abertelrud
Copy link
Contributor

@abertelrud abertelrud commented Jun 6, 2021

Respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET if it is set in the environment, otherwise stay with the default minimum deployment target of 10.10 on macOS.

ToolsSupportCore has availability annotations to represent requirements on various versions of macOS. Yet ToolsSupportCore itself doesn't specify a minimum deployment target for macOS, and so it always builds for macOS 10.10.

This aligns with both swift-package-manager and with swift-driver, and is important now that ToolSupportCore has started containing some code that is annotated with availability for Darwin platforms (Netrc support required 10.13 or later). It does use the package-neutral name SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET and the expectation is that both SwiftDriver and SwiftPM will at some point switch to that name as well.

@abertelrud
Copy link
Contributor Author

@swift-ci please test

@abertelrud
Copy link
Contributor Author

@swift-ci please test linux

@abertelrud abertelrud self-assigned this Jun 7, 2021
@abertelrud
Copy link
Contributor Author

Looks like the same issue as in #218, which appears to be an infrastructure issue. @shahmishal

@tomerd
Copy link
Contributor

tomerd commented Jun 9, 2021

@swift-ci please test linux

@tomerd
Copy link
Contributor

tomerd commented Jun 9, 2021

leaking SWIFTPM_MACOS_DEPLOYMENT_TARGET seems wrong to me, if Driver, ToolsSupportCore and SwiftPM must share a setting it should be named something more generic: SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET

cc @artemcm

@abertelrud
Copy link
Contributor Author

leaking SWIFTPM_MACOS_DEPLOYMENT_TARGET seems wrong to me, if TSC and SwiftPM must share a setting it should be named something more generic

Yes, I agree, and did this because SwiftDriver is already using but — but perhaps that was a bit hasty. We should change the one in SwiftDriver then as well, if we have a generic one, or set all three independently. We basically want to build the components of the toolchain with the minimum deployment target the toolchain supports, and ideally keep them the same.

@abertelrud
Copy link
Contributor Author

abertelrud commented Jun 9, 2021

leaking SWIFTPM_MACOS_DEPLOYMENT_TARGET seems wrong to me, if TSC and SwiftPM must share a setting it should be named something more generic

Yes, I agree, and did this because SwiftDriver is already using but — but perhaps that was a bit hasty. We should change the one in SwiftDriver then as well, if we have a generic one, or set all three independently. We basically want to build the components of the toolchain with the minimum deployment target the toolchain supports, and ideally keep them the same.

What would you think about having separate names and then having the toolchain build script set them all the same? That also provides independent control if it's needed.

@tomerd
Copy link
Contributor

tomerd commented Jun 9, 2021

What would you think about having separate names and then having the toolchain build script set them all the same?

wither that or use a generic one like SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET

@abertelrud
Copy link
Contributor Author

What would you think about having separate names and then having the toolchain build script set them all the same?

wither that or use a generic one like SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET

That would probably be better, especially as we extend this to other platforms that have deployment targets. @artemcm any preference?

@abertelrud abertelrud force-pushed the eng/anders/allow-newer-min-deployment-target branch from b19825a to 9465032 Compare June 9, 2021 01:56
…uring Swift toolchain build)

If it is not set in the environment, stay with the default minimum deployment target of 10.10 on macOS.

This aligns with both swift-package-manager and with swift-driver, and is important now that ToolSupportCore has started containing some code that is annotated with availability for Darwin platforms.  It uses the more project-neutral name `SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET` and the expectation is that both SwiftPM and SwiftDriver will switch to using it as well.
@abertelrud abertelrud force-pushed the eng/anders/allow-newer-min-deployment-target branch from 9465032 to b333a2b Compare June 9, 2021 01:56
@abertelrud abertelrud changed the title Respect SWIFTPM_MACOS_DEPLOYMENT_TARGET if it is set in the environment Respect SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET if it is set in the environment Jun 9, 2021
@abertelrud
Copy link
Contributor Author

@swift-ci please test

@abertelrud abertelrud merged commit 21a7918 into main Jun 9, 2021
@abertelrud abertelrud deleted the eng/anders/allow-newer-min-deployment-target branch June 12, 2021 23:03
abertelrud added a commit that referenced this pull request Jun 12, 2021
…h as during Swift toolchain build) (#220)

If it is not set in the environment, stay with the default minimum deployment target of 10.10 on macOS.

This aligns with both swift-package-manager and with swift-driver, and is important now that ToolSupportCore has started containing some code that is annotated with availability for Darwin platforms.  It uses the more project-neutral name `SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET` and the expectation is that both SwiftPM and SwiftDriver will switch to using it as well.

(cherry picked from commit 21a7918)
abertelrud added a commit that referenced this pull request Jun 14, 2021
…h as during Swift toolchain build) (#220) (#224)

If it is not set in the environment, stay with the default minimum deployment target of 10.10 on macOS.

This aligns with both swift-package-manager and with swift-driver, and is important now that ToolSupportCore has started containing some code that is annotated with availability for Darwin platforms.  It uses the more project-neutral name `SWIFT_TOOLCHAIN_MACOS_DEPLOYMENT_TARGET` and the expectation is that both SwiftPM and SwiftDriver will switch to using it as well.

(cherry picked from commit 21a7918)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants