Skip to content

Commit 9c2e830

Browse files
committed
Make rustc-link-arg-cdylib the standard form
This form has the consistent pattern of `rustc-link-arg-$KIND`. The old, original `rustc-cdylib-link-arg` is just an alias.
1 parent 21d58d4 commit 9c2e830

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

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

+6-3
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ one detailed below.
105105
to re-run the script.
106106
* [`cargo::rustc-link-arg=FLAG`](#rustc-link-arg) --- Passes custom flags to a
107107
linker for benchmarks, binaries, `cdylib` crates, examples, and tests.
108-
* [`cargo::rustc-cdylib-link-arg=FLAG`](#rustc-cdylib-link-arg) --- Passes custom
108+
* [`cargo::rustc-link-arg-cdylib=FLAG`](#rustc-cdylib-link-arg) --- Passes custom
109109
flags to a linker for cdylib crates.
110110
* [`cargo::rustc-link-arg-bin=BIN=FLAG`](#rustc-link-arg-bin) --- Passes custom
111111
flags to a linker for the binary `BIN`.
@@ -147,13 +147,16 @@ linker script.
147147

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

150-
### `cargo::rustc-cdylib-link-arg=FLAG` {#rustc-cdylib-link-arg}
150+
### `cargo::rustc-link-arg-cdylib=FLAG` {#rustc-cdylib-link-arg}
151151

152-
The `rustc-cdylib-link-arg` instruction tells Cargo to pass the [`-C
152+
The `rustc-link-arg-cdylib` instruction tells Cargo to pass the [`-C
153153
link-arg=FLAG` option][link-arg] to the compiler, but only when building a
154154
`cdylib` library target. Its usage is highly platform specific. It is useful
155155
to set the shared library version or the runtime-path.
156156

157+
For historical reasons, the `cargo::rustc-cdylib-link-arg` form is an alias
158+
for `cargo::rustc-link-arg-cdylib`, and has the same meaning.
159+
157160
### `cargo::rustc-link-arg-bin=BIN=FLAG` {#rustc-link-arg-bin}
158161

159162
The `rustc-link-arg-bin` instruction tells Cargo to pass the [`-C

0 commit comments

Comments
 (0)