Skip to content

[6.2] Allow linking _Concurrency for WASI with Embedded Swift #1865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 11, 2025

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Apr 8, 2025

Cherry-pick of #1863.

Explanation: Currently, when building packages for WASI with Embedded Swift, libraries such as libswift_Concurrency.a and libswift_ConcurrencyDefaultExecutor.a are not discoverable and require passing -Xlinker <swift-sdk-path>/usr/lib/swift/embedded/wasm32-unknown-wasip1 option manually. This path can be inferred by the driver, which simplifies build invocations for users significantly, while the rest of linkage options (-lswift_Concurrency etc) can be specified in toolset files.
Scope: Limited to Embedded Swift for Wasm.
Risk: Low due to limited scope.
Testing: Added new automated test cases.
Issue: rdar://148820885
Reviewer: @kateinoigakukun

Currently, when building packages for WASI with Embedded Swift, libraries such as `libswift_Concurrency.a` and `libswift_ConcurrencyDefaultExecutor.a` are not discoverable and require passing `-Xlinker <swift-sdk-path>/usr/lib/swift/embedded/wasm32-unknown-wasip1` option manually. This path can be inferred by the driver, which simplifies build invocations for users significantly, while the rest of linkage options (`-lswift_Concurrency` etc) can be specified in toolset files.
@MaxDesiatov MaxDesiatov requested a review from bnbarham April 8, 2025 13:15
@MaxDesiatov MaxDesiatov marked this pull request as ready for review April 8, 2025 13:15
@MaxDesiatov MaxDesiatov added the embedded Changes related to Embedded Swift label Apr 8, 2025
@MaxDesiatov
Copy link
Contributor Author

@swift-ci test

@MaxDesiatov MaxDesiatov enabled auto-merge (squash) April 8, 2025 13:16
@MaxDesiatov MaxDesiatov disabled auto-merge April 8, 2025 13:16
@MaxDesiatov MaxDesiatov merged commit 4f38059 into main Apr 11, 2025
3 checks passed
@MaxDesiatov MaxDesiatov deleted the maxd/embedded-link-path-6.2 branch April 11, 2025 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
embedded Changes related to Embedded Swift swift 6.2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants