Skip to content

Commit 8726da2

Browse files
committed
Move -Zextra-link-arg documentation into unstable.md.
1 parent d3454cb commit 8726da2

File tree

2 files changed

+31
-26
lines changed

2 files changed

+31
-26
lines changed

src/doc/src/reference/build-scripts.md

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,6 @@ one detailed below.
105105
* [`cargo:rustc-env=VAR=VALUE`](#rustc-env) — Sets an environment variable.
106106
* [`cargo:rustc-cdylib-link-arg=FLAG`](#rustc-cdylib-link-arg) — Passes custom
107107
flags to a linker for cdylib crates.
108-
* [`cargo:rustc-bin-link-arg=FLAG`](#rustc-bin-link-arg) — Passes custom
109-
flags to a linker for bin crates.
110-
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) — Passes custom
111-
flags to a linker for all supported crates.
112108
* [`cargo:warning=MESSAGE`](#cargo-warning) — Displays a warning on the
113109
terminal.
114110
* [`cargo:KEY=VALUE`](#the-links-manifest-key) — Metadata, used by `links`
@@ -209,26 +205,6 @@ to set the shared library version or the runtime-path.
209205

210206
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
211207

212-
<a id="rustc-bin-link-arg"></a>
213-
#### `cargo:rustc-bin-link-arg=FLAG`
214-
215-
The `rustc-bin-link-arg` instruction tells Cargo to pass the [`-C
216-
link-arg=FLAG` option][link-arg] to the compiler, but only when building a
217-
binary target. Its usage is highly platform specific. It is useful
218-
to set a linker script or other linker options.
219-
220-
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
221-
222-
<a id="rustc-link-arg"></a>
223-
#### `cargo:rustc-link-arg=FLAG`
224-
225-
The `rustc-link-arg` instruction tells Cargo to pass the [`-C link-arg=FLAG`
226-
option][link-arg] to the compiler, but only when building a supported target
227-
(currently a binary or `cdylib` library). Its usage is highly platform
228-
specific. It is useful to set the shared library version or linker script.
229-
230-
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
231-
232208
<a id="cargo-warning"></a>
233209
#### `cargo:warning=MESSAGE`
234210

@@ -396,8 +372,6 @@ rustc-flags = "-L /some/path"
396372
rustc-cfg = ['key="value"']
397373
rustc-env = {key = "value"}
398374
rustc-cdylib-link-arg = [""]
399-
rustc-bin-link-arg = [""]
400-
rustc-link-arg = [""]
401375
metadata_key1 = "value"
402376
metadata_key2 = "value"
403377
```

src/doc/src/reference/unstable.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,37 @@ timings = 'yes'
2020
Some unstable features will require you to specify the `cargo-features` key in
2121
`Cargo.toml`.
2222

23+
### extra-link-arg
24+
* Original Pull Request: [#7811](https://github.com/rust-lang/cargo/pull/7811)
25+
26+
The `-Z extra-link-arg` flag makes the following two instructions available
27+
in build scripts:
28+
29+
* [`cargo:rustc-bin-link-arg=FLAG`](#rustc-bin-link-arg) — Passes custom
30+
flags to a linker for bin crates.
31+
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) — Passes custom
32+
flags to a linker for all supported crates.
33+
34+
<a id="rustc-bin-link-arg"></a>
35+
#### `cargo:rustc-bin-link-arg=FLAG`
36+
37+
The `rustc-bin-link-arg` instruction tells Cargo to pass the [`-C
38+
link-arg=FLAG` option][link-arg] to the compiler, but only when building a
39+
binary target. Its usage is highly platform specific. It is useful
40+
to set a linker script or other linker options.
41+
42+
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
43+
44+
<a id="rustc-link-arg"></a>
45+
#### `cargo:rustc-link-arg=FLAG`
46+
47+
The `rustc-link-arg` instruction tells Cargo to pass the [`-C link-arg=FLAG`
48+
option][link-arg] to the compiler, but only when building a supported target
49+
(currently a binary or `cdylib` library). Its usage is highly platform
50+
specific. It is useful to set the shared library version or linker script.
51+
52+
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
53+
2354
### no-index-update
2455
* Original Issue: [#3479](https://github.com/rust-lang/cargo/issues/3479)
2556
* Tracking Issue: [#7404](https://github.com/rust-lang/cargo/issues/7404)

0 commit comments

Comments
 (0)