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

Pass -l:libfoo.a to linker directly. #149

Merged
merged 1 commit into from Jul 12, 2023

Conversation

chenyuanrun
Copy link
Contributor

Fix #148 .

@chenyuanrun
Copy link
Contributor Author

Something need to be changed

@chenyuanrun chenyuanrun marked this pull request as ready for review July 12, 2023 10:48
@chenyuanrun
Copy link
Contributor Author

Something need to be changed

Done.

For -l:xxx, ld would link to file xxx directly instead of linking to
libxxx.a/.so, rustc can not handle such situation perfectly, so just
pass this flag to linker.

Ref: https://sourceware.org/binutils/docs/ld/Options.html
@chenyuanrun chenyuanrun changed the title Trim leading ':' from -l flags Pass -l:libfoo.a to linker directly. Jul 12, 2023
src/lib.rs Show resolved Hide resolved
@sdroege sdroege merged commit 576f550 into rust-lang:master Jul 12, 2023
4 checks passed
@chenyuanrun
Copy link
Contributor Author

Thanks!

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.

Cargo build say "library name must not be empty" while using statik(true)
2 participants