Skip to content

Conversation

@owenv
Copy link
Collaborator

@owenv owenv commented Jan 6, 2026

This is a copy of #966 + a couple minor renaming, some test fixes, and squashed

@owenv
Copy link
Collaborator Author

owenv commented Jan 6, 2026

@swift-ci test

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
@owenv
Copy link
Collaborator Author

owenv commented Jan 7, 2026

This seems to be introducing some kind of nondeterminism in build description serialization I haven't tracked down yet

@owenv
Copy link
Collaborator Author

owenv commented Jan 7, 2026

@swift-ci test

@MaxDesiatov MaxDesiatov changed the title Swift SDK for WASM using the run destination Swift SDK for Wasm using the run destination Jan 7, 2026
@owenv
Copy link
Collaborator Author

owenv commented Jan 7, 2026

@swift-ci test

@owenv owenv merged commit 7904b01 into swiftlang:main Jan 7, 2026
92 of 95 checks passed
owenv added a commit that referenced this pull request Jan 8, 2026
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.

3 participants