Skip to content

Conversation

@kateinoigakukun
Copy link
Member

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:

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

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
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.

1 participant