Skip to content
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

Temporary fix for static linking on Linux #4637

Closed
wants to merge 1 commit into from

Conversation

MaxDesiatov
Copy link
Contributor

@MaxDesiatov MaxDesiatov commented Sep 29, 2022

When using @_implementationOnly, the dependencies do not get emitted into the module files and static linking does not work.

Originally submitted by @drexin as #3135.

There was another PR that was supposed to fix it, but apparently it currently doesn't work on Linux: #3052

Repro test case added in swiftlang/swift#61372

When using @_implementationOnly, the dependencies do not get emited into the module files and static linking does not work. There is a proper fix in 5.6, so this is only a temporary solution for 5.5.
@MaxDesiatov MaxDesiatov requested review from compnerd and tomerd and removed request for compnerd September 29, 2022 22:12
@MaxDesiatov
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

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

This makes CFURLSessionInterface "public" which seems like the wrong thing to do. For the static linking, why not consume the TARGET_OBJECTS for the library into the archive for Foundation? Statically linking should DCE the objects appropriately.

@MaxDesiatov
Copy link
Contributor Author

Closing this as we need a different fix for #4644.

@MaxDesiatov MaxDesiatov closed this Dec 6, 2022
@MaxDesiatov MaxDesiatov deleted the maxd/networking-static-linking branch December 6, 2022 11:41
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