-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[SR-14896] swift build --build-system xcode
doesn't respect SWIFT_EXEC
#3596
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
[SR-14896] swift build --build-system xcode
doesn't respect SWIFT_EXEC
#3596
Conversation
@@ -133,20 +131,28 @@ public final class XcodeBuildSystem: SPMBuildCore.BuildSystem { | |||
supportedArchitectures: [], |
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.
While you're in this area, can targetArchitecture also be updated to the host architecture (x86_64 or arm64) instead of hardcoded, if it's readily available?
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.
Absolutely — there's a whole range of fixes here, but I wanted to parcel them out across a couple of different PRs. This particular one would unblock some CI problems, as alluded to, but I plan to put up another PR that cleans up some of the other hardcoded things here. Also -toolchain
and -sdk
are not respected, for example.
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.
Put up as a separate PR here: #3597
I probably need to conditionalize this on macOS before running tests. Marking as WIP until then. |
8827104
to
88ec72b
Compare
@swift-ci please smoke test |
…EXEC` When using the `xcode` build system, SwiftPM isn't passing down the result of overriding SWIFT_EXEC. The same is true for `-toolchain` and `-sdk` but this will be fixed in a different PR. Besides being incorrect and thus a generally something that should be fixed, this also affects SwiftPM CI, where the newly built compiler isn't being used when cross-compilation is active (since SwiftPM currently implements multi-architecture builds by switching build system to use xcbuild). rdar://80194565
88ec72b
to
f953c9a
Compare
@swift-ci please smoke test |
…SWIFT_EXEC` (swiftlang#3596) When using the `xcode` build system, SwiftPM isn't passing down the result of overriding SWIFT_EXEC. The same is true for `-toolchain` and `-sdk` but this will be fixed in a different PR. Besides being incorrect and thus a generally something that should be fixed, this also affects SwiftPM CI, where the newly built compiler isn't being used when cross-compilation is active (since SwiftPM currently implements multi-architecture builds by switching build system to use xcbuild). This is the Swift 5.5 nomination of this fix. rdar://80194565 (cherry picked from commit 9aab44d)
…SWIFT_EXEC` (#3596) (#3600) When using the `xcode` build system, SwiftPM isn't passing down the result of overriding SWIFT_EXEC. The same is true for `-toolchain` and `-sdk` but this will be fixed in a different PR. Besides being incorrect and thus a generally something that should be fixed, this also affects SwiftPM CI, where the newly built compiler isn't being used when cross-compilation is active (since SwiftPM currently implements multi-architecture builds by switching build system to use xcbuild). This is the Swift 5.5 nomination of this fix. rdar://80194565 (cherry picked from commit 9aab44d)
When using the
xcode
build system, SwiftPM isn't passing down the result of overriding SWIFT_EXEC. The same is true for-toolchain
and-sdk
but this will be fixed in a different PR.Motivation:
Besides being incorrect and thus a generally something that should be fixed, this also affects SwiftPM CI, where the newly built compiler isn't being used when cross-compilation is active (since SwiftPM currently implements multi-architecture builds by switching build system to use xcbuild).
Modifications:
xcbuild
so it matches what the native build system would have usedrdar://80194565