Github Add `cargo:rustc-link-arg-bin` flag. by Dirbaio · Pull Request #9486 · ru...
source link: https://github.com/rust-lang/cargo/pull/9486
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
This PR implements a cargo:rustc-link-arg-bin
command to specify per-binary link args from build scripts. This follows the suggestion from the tracking issue #9426.
Syntax is cargo:rustc-link-arg-bin=BIN_NAME=ARG
This was previously possible to do using the #[link_args=".."]
attribute, but it was removed in rust-lang/rust#83820 in favor of the Cargo extra-link-args feature, which can currently not specify different link args for different bins in the same crate. This PR adds back the ability to do that.
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK