Skip to content

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

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

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.

Close #82825

@kateinoigakukun
Copy link
Member Author

@swift-ci test

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 force-pushed the yt/fix-isolated-conformance-static-link branch from de176b2 to c0b4727 Compare July 16, 2025 06:28
@kateinoigakukun
Copy link
Member Author

@swift-ci test

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test macOS

Copy link
Contributor

@edymtt edymtt left a comment

Choose a reason for hiding this comment

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

Looks good to me with regard to the build system changes.

Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Ah, your fix makes sense. Thank you! We should cherry-pick this to release/6.2 as well.

@DougGregor
Copy link
Member

the macOS full-test failure is unrelated, this is fine to merge

@kateinoigakukun kateinoigakukun merged commit af85e06 into swiftlang:main Jul 16, 2025
4 of 5 checks passed
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.

WebAssembly does not support runtime checking of isolated conformances
4 participants