Skip to content

Conversation

@cmcgee1024
Copy link
Member

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.

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.
"SWIFT_RESOURCE_DIR": .plString(swiftResourceDir.str), // Resource dir for compiling Swift
"CLANG_RESOURCE_DIR": .plString(clangResourceDir.str), // Resource dir for linking C/C++/Obj-C
"SDKROOT": .plString(sysroot.str),
"OTHER_LDFLAGS": .plArray(["$(OTHER_SWIFT_FLAGS)"]), // The extra swift compiler settings in JSON are intended to go to the linker driver too
Copy link
Collaborator

@owenv owenv Dec 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we need to include swift flags here, we should use extraSwiftCompilerSettings instead of $(OTHER_SWIFT_FLAGS), because $(OTHER_SWIFT_FLAGS) may include other project/command line flags which are only intended for the compiler

Copy link
Collaborator

@jakepetroules jakepetroules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good! :)

Left another round of feedback.

Copy link
Collaborator

@owenv owenv left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking good to me, I think it's pretty much good as a first step to land once we get some basic tests in place. Left one minor comment/question

Copy link
Collaborator

@jakepetroules jakepetroules left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking pretty good, mostly some style feedback plus a small blocking issue around the Linux triples.

@jakepetroules
Copy link
Collaborator

The only remaining feedback I have so far are the two unresolved comments related to SYSROOT/SDKROOT/-sdk/-sysroot.

@cmcgee1024 cmcgee1024 marked this pull request as ready for review December 19, 2025 20:47
@cmcgee1024 cmcgee1024 requested a review from aciidgh as a code owner December 19, 2025 20:47
@cmcgee1024
Copy link
Member Author

@swift-ci please test

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