Wasm: Use -sysroot value as the clang linker sysroot if provided#2053
Open
kateinoigakukun wants to merge 1 commit intoswiftlang:mainfrom
Open
Wasm: Use -sysroot value as the clang linker sysroot if provided#2053kateinoigakukun wants to merge 1 commit intoswiftlang:mainfrom
-sysroot value as the clang linker sysroot if provided#2053kateinoigakukun wants to merge 1 commit intoswiftlang:mainfrom
Conversation
For other Unix-like platforms, the driver already respects `-sysroot` over `-sdk` as the native sysroot (not Swift "SDK"). See the following PRs for reference: * swiftlang#1811 * swiftlang/swift#72352 For WebAssembly, this change makes the driver behave consistently with other platforms. This consistency is important for supporting swiftc as a swift-build's underlying linker driver for Wasm targets, as UnixLd.xcspec now uses `-sysroot` by default: https://github.com/swiftlang/swift-build/blob/02e9f6778b621375b5a5a2fe40f9a4b55bb44ba0/Sources/SWBGenericUnixPlatform/Specs/UnixLd.xcspec#L61-L68
kateinoigakukun
added a commit
to kateinoigakukun/swift-build
that referenced
this pull request
Dec 26, 2025
…ot` for now The override is needed because swift-driver currently does not respect `-sysroot` for Wasm targets, but only `-sdk`. This will be fixed in swift-driver in the change: swiftlang/swift-driver#2053
kateinoigakukun
added a commit
to kateinoigakukun/swift-build
that referenced
this pull request
Dec 26, 2025
…ot` for now The override is needed because swift-driver currently does not respect `-sysroot` for Wasm targets, but only `-sdk`. This will be fixed in swift-driver in the change: swiftlang/swift-driver#2053
Member
|
This new It is possible that your Wasm work will do fine with it- I don't know- as your SDK bundle may be more self-contained, but it definitely still has problems on Unix. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
For other Unix-like platforms, the driver already respects
-sysrootover-sdkas the native sysroot (not Swift "SDK"). See the following PRs for reference:-sysrootflag for all non-Darwin Unix platforms, not just Android #1811-sysrootoption for non-Darwin targets swift#72352For WebAssembly, this change makes the driver behave consistently with other platforms. This consistency is important for supporting swiftc as a swift-build's underlying linker driver for Wasm targets, as UnixLd.xcspec now uses
-sysrootby default:https://github.com/swiftlang/swift-build/blob/02e9f6778b621375b5a5a2fe40f9a4b55bb44ba0/Sources/SWBGenericUnixPlatform/Specs/UnixLd.xcspec#L61-L68