-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add cargo:rustc-link-arg-bin
flag.
#9486
Conversation
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Eh2406 (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
r? @ehuss This looks good, thanks! Can you add a test, somewhere in |
@ehuss done! |
Thanks! @bors r+ |
📌 Commit daffd0a has been approved by |
☀️ Test successful - checks-actions |
Update cargo 7 commits in 070e459c2d8b79c5b2ac5218064e7603329c92ae..e931e4796b61de593aa1097649445e535c9c7ee0 2021-05-11 18:12:23 +0000 to 2021-05-24 16:17:27 +0000 - Add `cargo:rustc-link-arg-bin` flag. (rust-lang/cargo#9486) - Add a cargo-doc.browser config option (rust-lang/cargo#9473) - Fix bug when with resolver = "1" non-virtual package was allowing unknown features (rust-lang/cargo#9437) - Add GitHub link to contributor guide. (rust-lang/cargo#9493) - Add temporary fix for rustup on windows in CI. (rust-lang/cargo#9498) - 3 typos and some capitalization (rust-lang/cargo#9495) - fix 6 typos (rust-lang/cargo#9484)
Update cargo 7 commits in 070e459c2d8b79c5b2ac5218064e7603329c92ae..e931e4796b61de593aa1097649445e535c9c7ee0 2021-05-11 18:12:23 +0000 to 2021-05-24 16:17:27 +0000 - Add `cargo:rustc-link-arg-bin` flag. (rust-lang/cargo#9486) - Add a cargo-doc.browser config option (rust-lang/cargo#9473) - Fix bug when with resolver = "1" non-virtual package was allowing unknown features (rust-lang/cargo#9437) - Add GitHub link to contributor guide. (rust-lang/cargo#9493) - Add temporary fix for rustup on windows in CI. (rust-lang/cargo#9498) - 3 typos and some capitalization (rust-lang/cargo#9495) - fix 6 typos (rust-lang/cargo#9484)
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.