-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Clarify documentation regarding +bundled
#12238
Conversation
r? @ehuss (rustbot has picked a reviewer for you, use r? to override) |
bundled
+bundled
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the pull request!
Should we put this in Rustc Book instead? From my understanding Cargo passes it as arg value of -l
flag to rustc. Cargo itself doesn't nothing to the value you set.
cargo/src/cargo/core/compiler/mod.rs
Lines 492 to 494 in e07efd8
for name in output.library_links.iter() { | |
rustc.arg("-l").arg(name); | |
} |
I think ideally it should be duplicated in both places, just because it's very confusing point. We had to debug for few weeks a linking issue at the company I'm currently working, just because someone forgot |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clarification!
Since it's more like a behavior of rustc, I'd like to see a PR landed in rustc first. Then we can confirm the behavior is correctly documented.
@@ -183,7 +183,11 @@ through the library target's public API. | |||
The optional `KIND` may be one of `dylib`, `static`, or `framework`. See the | |||
[rustc book][option-link] for more detail. | |||
|
|||
Note that if you don't specify the `KIND` when using `rustc-link-lib`, the default linkage modifiers won't be applied. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Could these lines respect line wraps in this markdown file?
I opened a PR in rustc: rust-lang/rust#112384 |
@@ -183,7 +183,11 @@ through the library target's public API. | |||
The optional `KIND` may be one of `dylib`, `static`, or `framework`. See the | |||
[rustc book][option-link] for more detail. | |||
|
|||
Note that if you don't specify the `KIND` when using `rustc-link-lib`, the default linkage modifiers won't be applied. | |||
For instance, [`+bundled` linkage modifier][bundled-link] won't be used in conjunction with `static` by default. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
..., the [+bundled
...
Closing this as inactive. Feel free to reöpen this pr or create a new pr if you get the time to work on this. Thanks |
No description provided.