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

The --static-swift-stdlib should apply to dylibs #7501

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

neonichu
Copy link
Contributor

Dynamic libraries are also linking the stdlib, so they should be treated the same as executables w.r.t. to this option.

Dynamic libraries are also linking the stdlib, so they should be treated the same as executables w.r.t. to this option.
@neonichu
Copy link
Contributor Author

@swift-ci please test

@neonichu
Copy link
Contributor Author

Not entirely sure how to test this, I mostly came across it by seeing that the warning isn't shown when building dylibs on macOS.

@MaxDesiatov MaxDesiatov added the needs tests This change needs test coverage label Apr 26, 2024
@MaxDesiatov
Copy link
Contributor

Wouldn't build plan generation with this option enabled cover it?

@MaxDesiatov MaxDesiatov added build system Changes to interactions with build systems bug labels Apr 26, 2024
@gregcotten
Copy link

gregcotten commented Jul 19, 2024

I'm currently running into a wall right now trying to build a dynamic library on Ubuntu 22 with --static-swift-stdlib. I ultimately end up with this error during linking:

/usr/bin/ld.gold: error: cannot find -lDispatchStubs
/usr/bin/ld.gold: error: cannot find -lCoreFoundation
/usr/bin/ld.gold: error: cannot find -luuid

replacing with -Xswiftc -static-stdlib does the job, currently. Just adding this for visibility!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug build system Changes to interactions with build systems needs tests This change needs test coverage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants