rust-lang / reference

The Rust Reference
https://doc.rust-lang.org/nightly/reference/
Apache License 2.0
1.16k stars 451 forks source link

Add note about static libraries not linking their dependencies #1472

Open madsmtm opened 3 months ago

madsmtm commented 3 months ago

This confused me for a while, but this is just fundamentally how static libraries work.

Wading through some history on this, I think when specifying --crate-type=staticlib, rustc used to output the --print=native-static-libs note by default, but it doesn't anymore, so let's document it instead!