Vadim Petrochenkov
Vadim Petrochenkov
I'd say the full name is "native library modifiers" because they are not necessarily about linking in the narrow sense, since they can also control bundling of native libraries into...
Renamed to `link_lib_modifiers` to match the modified cargo directive.
Ping @m-ou-se. Can this be merged in some form and released before the Rust 1.61 release? It helps to address the first compatibility note from https://github.com/rust-lang/rust/pull/96539/files.
This is a rustc syntax (https://doc.rust-lang.org/nightly/rustc/command-line-arguments.html#-l-link-the-generated-crate-to-a-native-library), cargo just passes the `STRING` in `cargo:rustc-link-lib=STRING` directly to rustc. But I agree that the cargo docs also need to be updated, I'll send...
>Can you add a link to that in the doc comment for link_lib_modifiers? Done. >The flag() method takes a single flag and adds it to a list of flags, similar...
@helgoboss FWIW, `+whole-archive` can be passed even without this API, by using [`build.cargo_metadata(false)`](https://docs.rs/cc/1.0.73/cc/struct.Build.html#method.cargo_metadata) first, and then emitting the `cargo:rust-ling-*` directives manually: ```rust println!("cargo:rustc-link-lib=static:+whole-archive={}", lib_name); println!("cargo:rustc-link-search=native={}", env::var("OUT_DIR")); ``` Ping @m-ou-se again.
PR for this - https://github.com/rust-lang/cc-rs/pull/671. Workaround - https://github.com/rust-lang/cc-rs/pull/671#issuecomment-1150326799.
I'm on board with the high-level `-Clink-self-contained=linker -Clinker-flavor=gcc-lld` strategy, but I'd prefer to sign off on the stabilization only when it's actually implemented, reviewed in detail, and merged. I'm in...
@rustbot second
>I also just found rust-lang/highfive#266 by @petrochenkov; so, this is something thought about before. I no longer think that maintaining such an expert map manually is a good idea, the...