Swift SDK for Wasm using the run destination#1006
Merged
owenv merged 2 commits intoswiftlang:mainfrom Jan 7, 2026
Merged
Conversation
Collaborator
Author
|
@swift-ci test |
jakepetroules
approved these changes
Jan 6, 2026
The client can provide a Swift SDK manifest path along with a triple in the run destination to synthesize a Swift Build SDK. This serves as a fallback for cases where Swift Build cannot match an SDK for it. Note that in this first implementation the platform is hard coded to webassembly, and so only SDK's that align with WASM, such as static linking of compiler runtime pieces, and some Unix semantics will work. Restore the emit executable argument in Ld.xcspec Override the rpath argument to the linker in the webassembly ld xcspec instead of the base ld xcspec Move the platform registerSDK call to its original position Undo use of sdk.canonicalName instead of the provided canonical name Fix compile error in tests Formatting Base the OTHER_LDFLAGS on the extra swift compiler settings Add the missing sdk parameter to swiftc linker driver in UnixLD.xcpsec Fix typo Introduce a new synthesizedSDK method for SDK registries that specializes in producing one from run destination information Introduce a new synthesizedSDK method for SDK registries that specializes in producing one from run destination information Formatting and remove active run destination qualifier Make explicit build target in run destination with both Apple and Swift SDK cases Move the workaround for the UnixLd removal of the -sdk link argument into WasmLd Rework the SWBBuildTarget API into a struct instead of an enum Fix the SDKROOT default value Add a new platformName capability to PlatformInfoExtension, using that to determine platform from triple Refactor name of appleSDK to toolchainSDK Code review feedback Introduce compatibility with encoding/decoding of the build targets Code review feedback Add a test case with an example WASM SDK to test run destination handling Minor test cleanup minor renaming
Collaborator
Author
|
This seems to be introducing some kind of nondeterminism in build description serialization I haven't tracked down yet |
Collaborator
Author
|
@swift-ci test |
Collaborator
Author
|
@swift-ci test |
owenv
added a commit
that referenced
this pull request
Jan 8, 2026
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.
This is a copy of #966 + a couple minor renaming, some test fixes, and squashed