From 51f7a44a9953825631d655948bee8e51e5f4bef8 Mon Sep 17 00:00:00 2001 From: Markus Reiter Date: Tue, 3 Nov 2020 17:45:36 +0100 Subject: [PATCH] State all supported targets for `rustc-link-arg`. --- src/doc/src/reference/unstable.md | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/doc/src/reference/unstable.md b/src/doc/src/reference/unstable.md index 196d210a550..816df88cf07 100644 --- a/src/doc/src/reference/unstable.md +++ b/src/doc/src/reference/unstable.md @@ -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. #### `cargo:rustc-link-arg-bins=FLAG` @@ -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