-
Notifications
You must be signed in to change notification settings - Fork 1.4k
SwiftSDK: Remove hardcoded WASI sysroot path derivation #8468
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
SwiftSDK: Remove hardcoded WASI sysroot path derivation #8468
Conversation
This change removes the hardcoded path derivation for the WASI sysroot from the `SwiftSDK.deriveTargetSwiftSDK` method. The previous implementation assumed there is $TOOLCHAIN_ROOT/share/wasi-sysroot when `--triple wasm32-unknown-wasi` is passed, but this is no longer the case with the [deprecation of the Wasm toolchain installation](swiftwasm/swift#5604) in favor of Swift SDKs.
@swift-ci test |
Thanks! Small clarification...
What do you mean " |
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.
This also seems like it'd be a good candidate for 6.1.2 if possible.
Yes, Swift SDK format itself allows supporting multiple triples, but the current SwiftPM's implementation does not respect the value passed to I have a plan to make a follow-up fix for it separately later. |
Got it, thanks for clarifying. |
@swift-ci test windows |
After swiftlang/swift-package-manager#8468, we no longer support wasi-sysroot embedded in the Swift toolchain, so the test no longer makes sense.
swiftlang/sourcekit-lsp#2107 |
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.
Thanks!
@swift-ci test self hosted windows |
Ah, we had to merge swiftlang/sourcekit-lsp#2107 before this... |
Remove hardcoded WASI sysroot path derivation just for wasi-sysroot embedded in toolchains
Motivation:
The previous implementation assumed there is $TOOLCHAIN_ROOT/share/wasi-sysroot when
--triple wasm32-unknown-wasi
is passed, but this is no longer the case with the deprecation of the Wasm toolchain installation in favor of Swift SDKs.Due to this unnecessary branch, when
--triple wasm32-unknown-wasi
is passed together with--swift-sdk
,--swift-sdk
is just ignored: #8465Modifications:
This change removes the hardcoded path derivation for the WASI sysroot from the
SwiftSDK.deriveTargetSwiftSDK
method.Result:
When
--triple wasm32-unknown-wasi
is passed without--swift-sdk
, no user visible change and they will keep getting the following:When
--triple wasm32-unknown-wasi
is passed together with--swift-sdk
,--triple
is ignored and--swift-sdk
is respected.