Skip to content

Commit 51f7a44

Browse files
committed
State all supported targets for rustc-link-arg.
1 parent e433cec commit 51f7a44

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/doc/src/reference/unstable.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ 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-link-arg-bins=FLAG`](#rustc-link-arg-bins) — 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.
29+
* [`cargo:rustc-link-arg-bins=FLAG`](#rustc-link-arg-bins) Passes custom
30+
flags to a linker for binaries.
31+
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) Passes custom flags to a
32+
linker for benchmarks, binaries, `cdylib` crates, examples, and tests.
3333

3434
<a id="rustc-link-arg-bins"></a>
3535
#### `cargo:rustc-link-arg-bins=FLAG`
@@ -45,9 +45,10 @@ to set a linker script or other linker options.
4545
#### `cargo:rustc-link-arg=FLAG`
4646

4747
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.
48+
option][link-arg] to the compiler, but only when building supported targets
49+
(benchmarks, binaries, `cdylib` crates, examples, and tests). Its usage is
50+
highly platform specific. It is useful to set the shared library version or
51+
linker script.
5152

5253
[link-arg]: ../../rustc/codegen-options/index.md#link-arg
5354

0 commit comments

Comments
 (0)