Skip to content

Commit

Permalink
State all supported targets for rustc-link-arg.
Browse files Browse the repository at this point in the history
  • Loading branch information
reitermarkus committed Nov 9, 2020
1 parent e433cec commit 51f7a44
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/doc/src/reference/unstable.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ 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-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.
* [`cargo:rustc-link-arg-bins=FLAG`](#rustc-link-arg-bins) Passes custom
flags to a linker for binaries.
* [`cargo:rustc-link-arg=FLAG`](#rustc-link-arg) Passes custom flags to a
linker for benchmarks, binaries, `cdylib` crates, examples, and tests.

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

The `rustc-link-arg` instruction tells Cargo to pass the [`-C link-arg=FLAG`
option][link-arg] to the compiler, but only when building a supported target
(currently a binary or `cdylib` library). Its usage is highly platform
specific. It is useful to set the shared library version or linker script.
option][link-arg] to the compiler, but only when building supported targets
(benchmarks, binaries, `cdylib` crates, examples, and tests). Its usage is
highly platform specific. It is useful to set the shared library version or
linker script.

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

Expand Down

0 comments on commit 51f7a44

Please sign in to comment.