Skip to content

[6.2][Concurrency] Fix runtime isolated-conformance checks with static stdlib #83120

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

Conversation

kateinoigakukun
Copy link
Member

@kateinoigakukun kateinoigakukun commented Jul 16, 2025

  • Explanation: Most linkers pull object files from static archives only if any symbol from that object file is referenced, even if the object contains a ctor code. Setup.cpp didn't have any symbols referenced from other code, so it was not linked in when the concurrency runtime was linked in statically (not WebAssembly-specific). This commit moves the ctor code to Task.cpp to ensure that it is always linked in.
  • Scope: Narrow, only affects cases where stdlib is linked statically.
  • Issues: Issue WebAssembly does not support runtime checking of isolated conformances #82825
  • Original PRs: [Concurrency] Fix runtime isolated-conformance checks with static stdlib #83086
  • Risk: Low, just a code move from Setup.cpp to Task.cpp with a few build tweaks
  • Testing: CI, unskipping a test for Wasm, which uses static stdlib link by default.
  • Reviewers: @DougGregor

Most of linkers pull object files from static archives only if any
symbol from that object file is referenced, even if the object contains
a ctor code. `Setup.cpp` didn't have any symbols referenced from
other code, so it was not linked in when the concurrency runtime was
linked in statically. This commit moves the ctor code to `Task.cpp`
to ensure that it is always linked in.
@kateinoigakukun kateinoigakukun requested a review from a team as a code owner July 16, 2025 23:53
@kateinoigakukun kateinoigakukun changed the title [Concurrency] Unskip isolated-conformance runtime test on WebAssembly 🍒[6.2][Concurrency] Fix runtime isolated-conformance checks with static stdlib Jul 16, 2025
@kateinoigakukun kateinoigakukun changed the title 🍒[6.2][Concurrency] Fix runtime isolated-conformance checks with static stdlib [6.2][Concurrency] Fix runtime isolated-conformance checks with static stdlib Jul 16, 2025
@kateinoigakukun kateinoigakukun added the 🍒 release cherry pick Flag: Release branch cherry picks label Jul 16, 2025
@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor
Copy link
Member

Thank you, Yuta!

@kateinoigakukun
Copy link
Member Author

Oops, Task.defaultExecutor and MainActor.executor have internal visibility in 6.2 branch. Let's just gate a part of the test behind a platform guard.

Custom global executor is not landing in 6.2, so we skip the test
by just gating it behind the platform check.
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun kateinoigakukun merged commit 0a5a694 into swiftlang:release/6.2 Jul 17, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🍒 release cherry pick Flag: Release branch cherry picks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants