-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Initialize Swift Build with a toolchain-based developer directory #8464
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
base: main
Are you sure you want to change the base?
Conversation
@@ -265,7 +266,11 @@ public final class SwiftBuildSystem: SPMBuildCore.BuildSystem { | |||
) | |||
|
|||
do { | |||
try await withSession(service: service, name: self.buildParameters.pifManifest.pathString, packageManagerResourcesDirectory: self.packageManagerResourcesDirectory) { session, _ in | |||
let toolchainPath = self.buildParameters.toolchain.swiftCompilerPath |
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.
I think the toolchain base path should also be part of the Toolchain protocol itself rather than expanded here in SwiftBuildSystem.
Also because on some platforms it's usr/local/bin instead of usr/local, so I'd rather that logic be kept In UserToolchain itself.
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.
There's not an obvious way to add that requirement right now because the SwiftPM-level toolchain type conflates toolchains, SDKs, and cross compilation bundles
7bd0ecd
to
99f53dc
Compare
@swift-ci test |
This allows us to correctly construct the stack of toolchains used for tool/library lookup internally, fixing builds of test targets (among other things).
Depends on swiftlang/swift-build#385