Skip to content

Use __BundleLookupHelper.self when building mergable library #1389

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

Conversation

Tantalum73
Copy link
Contributor

Updating the #bundle macro to check whether SWIFT_BUNDLE_LOOKUP_HELPER_AVAILABLE is set. If that is the case, the build system built a mergable library and emitted a class called __BundleLookupHelper.

The linker has a code path that makes Bundle(forClass: ) work for merged libraries, whereas the DSO-handle is the same for all merged targets.

The build system counterpart has been merged here: swiftlang/swift-build#599

@matthewseaman matthewseaman self-requested a review June 30, 2025 17:40
@jmschonfeld
Copy link
Contributor

@swift-ci please test

@jmschonfeld jmschonfeld merged commit 45ba668 into swiftlang:main Jul 1, 2025
16 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.

3 participants