Skip to content

Commit 9fca624

Browse files
committed
Rename rustc-bin-link-arg to rustc-link-arg-bins.
1 parent 5976d53 commit 9fca624

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

src/cargo/core/compiler/custom_build.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -547,7 +547,7 @@ impl BuildOutput {
547547
"rustc-link-lib" => library_links.push(value.to_string()),
548548
"rustc-link-search" => library_paths.push(PathBuf::from(value)),
549549
"rustc-cdylib-link-arg" => linker_args.push((Some(LinkType::Cdylib), value)),
550-
"rustc-bin-link-arg" => {
550+
"rustc-link-arg-bins" => {
551551
if extra_link_arg {
552552
linker_args.push((Some(LinkType::Bin), value));
553553
} else {

src/cargo/util/config/target.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ fn parse_links_overrides(
137137
let args = args.iter().map(|v| (Some(LinkType::Cdylib), v.0.clone()));
138138
output.linker_args.extend(args);
139139
}
140-
"rustc-bin-link-arg" => {
140+
"rustc-link-arg-bins" => {
141141
if extra_link_arg {
142142
let args = value.list(key)?;
143143
let args = args.iter().map(|v| (Some(LinkType::Bin), v.0.clone()));

src/doc/src/reference/unstable.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ Some unstable features will require you to specify the `cargo-features` key in
2626
The `-Z extra-link-arg` flag makes the following two instructions available
2727
in build scripts:
2828

29-
* [`cargo:rustc-bin-link-arg=FLAG`](#rustc-bin-link-arg) — Passes custom
29+
* [`cargo:rustc-link-arg-bins=FLAG`](#rustc-link-arg-bins) — Passes custom
3030
flags to a linker for bin crates.
3131
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) — Passes custom
3232
flags to a linker for all supported crates.
3333

34-
<a id="rustc-bin-link-arg"></a>
35-
#### `cargo:rustc-bin-link-arg=FLAG`
34+
<a id="rustc-link-arg-bins"></a>
35+
#### `cargo:rustc-link-arg-bins=FLAG`
3636

37-
The `rustc-bin-link-arg` instruction tells Cargo to pass the [`-C
37+
The `rustc-link-arg-bins` instruction tells Cargo to pass the [`-C
3838
link-arg=FLAG` option][link-arg] to the compiler, but only when building a
3939
binary target. Its usage is highly platform specific. It is useful
4040
to set a linker script or other linker options.

tests/testsuite/build_script_extra_link_arg.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ fn build_script_extra_link_arg_bin() {
1111
"build.rs",
1212
r#"
1313
fn main() {
14-
println!("cargo:rustc-bin-link-arg=--this-is-a-bogus-flag");
14+
println!("cargo:rustc-link-arg-bins=--this-is-a-bogus-flag");
1515
}
1616
"#,
1717
)

0 commit comments

Comments
 (0)