-
Notifications
You must be signed in to change notification settings - Fork 10.5k
[6.2] Fix linking Embedded Swift concurrency for Wasm #83288
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
Draft
MaxDesiatov
wants to merge
19
commits into
swiftlang:release/6.2
Choose a base branch
from
MaxDesiatov:deleted-method-6.2
base: release/6.2
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[6.2] Fix linking Embedded Swift concurrency for Wasm #83288
MaxDesiatov
wants to merge
19
commits into
swiftlang:release/6.2
from
MaxDesiatov:deleted-method-6.2
Conversation
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
@swift-ci smoke test linux |
1 similar comment
@swift-ci smoke test linux |
bf3f982
to
d3c56d8
Compare
@swift-ci smoke test linux |
ca945bf
to
ee22a6c
Compare
@swift-ci test |
ee22a6c
to
5d806ed
Compare
@swift-ci smoke test linux |
5d806ed
to
4c7a27b
Compare
Currently `test/CMakeLists.txt` can only set `SWIFT_LIT_ARGS` for all tests uniformly. This means that we can't have tests for Embedded Swift with a different set of params. Let's refactor computation of `lit.py` options and arguments into a separate function, which means these params can set separately for different tests. In this change we're only using it once, but in the future we anticipate another use of `setup_lit_args` specifically for Embedded Swift testing. # Conflicts: # test/CMakeLists.txt
Run new `check-swift-embedded-wasi` target from `test/CMakeLists.txt`, tweak `lit.cfg` to support both `-wasi` and `-wasip1` triples, exclude unsupported tests based on `CPU=wasm32` instead of `OS=wasi`. # Conflicts: # test/embedded/builtin-float.swift # test/embedded/dependencies-random.swift # test/embedded/float-abi-hard.swift # test/embedded/fragile-reference.swift # test/embedded/no-allocations-print.swift # test/embedded/optionset2.swift # test/embedded/ouroboros-bug.swift # test/embedded/static-object-non-darwin.swift # test/embedded/stdlib-array.swift # test/embedded/stdlib-basic.swift # test/embedded/stdlib-dictionary.swift # test/embedded/stdlib-random.swift # test/embedded/stdlib-set.swift # test/embedded/stdlib-strings-interpolation3.swift # test/embedded/stdlib-types.swift # test/embedded/traps-fatalerror-ir.swift
# Conflicts: # test/embedded/classes-generic-no-stdlib.swift
# Conflicts: # test/lit.cfg
4c7a27b
to
0f4b686
Compare
MaxDesiatov
commented
Jul 28, 2025
@@ -677,18 +677,6 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING) | |||
"${CMAKE_CURRENT_BINARY_DIR}${VARIANT_SUFFIX}/lit.site.cfg" | |||
"test${VARIANT_SUFFIX}.lit.site.cfg") | |||
swift_generate_lit_swift_features_cfg("${CMAKE_CURRENT_BINARY_DIR}${VARIANT_SUFFIX}/lit.swift-features.cfg") | |||
|
|||
set(VARIANT_SUFFIX "-embedded-wasi") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This variant is already enabled above on L610, removing as unused
`ExecutorImpl.cpp` should be moved from `SWIFT_RUNTIME_CONCURRENCY_NONEMBEDDED_C_SOURCES` to `SWIFT_RUNTIME_CONCURRENCY_C_SOURCES`. This way we can also include `ExecutorImpl.swift` and use `PlatformExecutorCooperative.swift` in embedded concurrency for WASI. # Conflicts: # stdlib/public/Concurrency/CMakeLists.txt # stdlib/public/Concurrency/Executor.swift
…g#83236) The test is only partially enabled: we only check for IR correctness and correct linking. We don't run the tests on WASI yet due to unrelated issues that are going to be resolved separately. # Conflicts: # test/embedded/concurrency-deleted-method.swift # test/lit.cfg
c9fa3c4
to
45c08e7
Compare
Teach the Embedded Swift compiler to include the Impl functions for the functions that provide Concurrency hooks.
We need to explicitly link `swift_asyncMainDrainQueueImpl` and `swift_createDefaultExecutors` since those two do not have Concurrency hooks and so aren't linked automatically by the macro-processing code.
# Conflicts: # stdlib/public/Concurrency/Executor.swift
# Conflicts: # stdlib/public/Concurrency/Executor.swift
@swift-ci smoke test linux |
concurrency-deleted-method.swift
test for wasip1
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.
Explanation: Cherry-pick of #82331, #83236 and #82270, merged to
main
as 7ada71b, f20417c, and b1eea5e respectively.The test is only partially enabled: we only check for IR correctness and correct linking. We don't run the tests on WASI yet due to unrelated issues that are going to be resolved separately.
Scope:
Risk:
Testing:
Issue: rdar://156506703
Reviewer: