]> git.proxmox.com Git - cargo.git/commitdiff
Rename `rustc-bin-link-arg` to `rustc-link-arg-bins`.
authorMarkus Reiter <me@reitermark.us>
Wed, 22 Jul 2020 00:02:37 +0000 (02:02 +0200)
committerMarkus Reiter <me@reitermark.us>
Mon, 9 Nov 2020 14:16:32 +0000 (15:16 +0100)
src/cargo/core/compiler/custom_build.rs
src/cargo/util/config/target.rs
src/doc/src/reference/unstable.md
tests/testsuite/build_script_extra_link_arg.rs

index 815fdf7aa8393631786546c805cd5f3ce786e203..8e3ed263458ba4ae2513b1907d9b66e4742e82ef 100644 (file)
@@ -547,7 +547,7 @@ impl BuildOutput {
                 "rustc-link-lib" => library_links.push(value.to_string()),
                 "rustc-link-search" => library_paths.push(PathBuf::from(value)),
                 "rustc-cdylib-link-arg" => linker_args.push((Some(LinkType::Cdylib), value)),
-                "rustc-bin-link-arg" => {
+                "rustc-link-arg-bins" => {
                     if extra_link_arg {
                         linker_args.push((Some(LinkType::Bin), value));
                     } else {
index acb7e9ae70ddd866b3529b31b47e3ff811d257bf..d1ff8463eda5c8835f5e06c7d26c98527afdf85b 100644 (file)
@@ -137,7 +137,7 @@ fn parse_links_overrides(
                     let args = args.iter().map(|v| (Some(LinkType::Cdylib), v.0.clone()));
                     output.linker_args.extend(args);
                 }
-                "rustc-bin-link-arg" => {
+                "rustc-link-arg-bins" => {
                     if extra_link_arg {
                         let args = value.list(key)?;
                         let args = args.iter().map(|v| (Some(LinkType::Bin), v.0.clone()));
index 71c4a1ab0bee8eca0571b41a9ee4bf98a52b17ad..196d210a5504304095576852d150fbc329da72fa 100644 (file)
@@ -26,15 +26,15 @@ Some unstable features will require you to specify the `cargo-features` key in
 The `-Z extra-link-arg` flag makes the following two instructions available
 in build scripts:
 
-* [`cargo:rustc-bin-link-arg=FLAG`](#rustc-bin-link-arg) — Passes custom
+* [`cargo:rustc-link-arg-bins=FLAG`](#rustc-link-arg-bins) — Passes custom
   flags to a linker for bin crates.
 * [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) — Passes custom
   flags to a linker for all supported crates.
 
-<a id="rustc-bin-link-arg"></a>
-#### `cargo:rustc-bin-link-arg=FLAG`
+<a id="rustc-link-arg-bins"></a>
+#### `cargo:rustc-link-arg-bins=FLAG`
 
-The `rustc-bin-link-arg` instruction tells Cargo to pass the [`-C
+The `rustc-link-arg-bins` instruction tells Cargo to pass the [`-C
 link-arg=FLAG` option][link-arg] to the compiler, but only when building a
 binary target. Its usage is highly platform specific. It is useful
 to set a linker script or other linker options.
index e728696080601c171757eb516987fb71772c41b2..e655414924e5a2da9e565fdf45f133165b2b2730 100644 (file)
@@ -11,7 +11,7 @@ fn build_script_extra_link_arg_bin() {
             "build.rs",
             r#"
                 fn main() {
-                    println!("cargo:rustc-bin-link-arg=--this-is-a-bogus-flag");
+                    println!("cargo:rustc-link-arg-bins=--this-is-a-bogus-flag");
                 }
             "#,
         )