@@ -105,6 +105,8 @@ 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
109+ flags to a linker for cdylib crates.
108110* [ ` cargo::rustc-link-arg-bin=BIN=FLAG ` ] ( #rustc-link-arg-bin ) --- Passes custom
109111 flags to a linker for the binary ` BIN ` .
110112* [ ` cargo::rustc-link-arg-bins=FLAG ` ] ( #rustc-link-arg-bins ) --- Passes custom
@@ -126,8 +128,6 @@ one detailed below.
126128* [ ` cargo::rustc-check-cfg=CHECK_CFG ` ] ( #rustc-check-cfg ) -- Register custom ` cfg ` s as
127129 expected for compile-time checking of configs.
128130* [ ` cargo::rustc-env=VAR=VALUE ` ] ( #rustc-env ) --- Sets an environment variable.
129- * [ ` cargo::rustc-cdylib-link-arg=FLAG ` ] ( #rustc-cdylib-link-arg ) --- Passes custom
130- flags to a linker for cdylib crates.
131131- [ ` cargo::error=MESSAGE ` ] ( #cargo-error ) --- Displays an error on the terminal.
132132* [ ` cargo::warning=MESSAGE ` ] ( #cargo-warning ) --- Displays a warning on the
133133 terminal.
@@ -147,6 +147,13 @@ 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}
151+
152+ The ` rustc-cdylib-link-arg ` instruction tells Cargo to pass the [ `-C
153+ link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a
154+ ` cdylib ` library target. Its usage is highly platform specific. It is useful
155+ to set the shared library version or the runtime-path.
156+
150157### ` cargo::rustc-link-arg-bin=BIN=FLAG ` {#rustc-link-arg-bin}
151158
152159The ` rustc-link-arg-bin ` instruction tells Cargo to pass the [ `-C
@@ -161,6 +168,24 @@ link-arg=FLAG` option][link-arg] to the compiler, but only when building a
161168binary target. Its usage is highly platform specific. It is useful
162169to set a linker script or other linker options.
163170
171+ ### ` cargo::rustc-link-arg-tests=FLAG ` {#rustc-link-arg-tests}
172+
173+ The ` rustc-link-arg-tests ` instruction tells Cargo to pass the [ `-C
174+ link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a
175+ tests target.
176+
177+ ### ` cargo::rustc-link-arg-examples=FLAG ` {#rustc-link-arg-examples}
178+
179+ The ` rustc-link-arg-examples ` instruction tells Cargo to pass the [ `-C
180+ link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building an examples
181+ target.
182+
183+ ### ` cargo::rustc-link-arg-benches=FLAG ` {#rustc-link-arg-benches}
184+
185+ The ` rustc-link-arg-benches ` instruction tells Cargo to pass the [ `-C
186+ link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a benchmark
187+ target.
188+
164189### ` cargo::rustc-link-lib=LIB ` {#rustc-link-lib}
165190
166191The ` rustc-link-lib ` instruction tells Cargo to link the given library using
@@ -185,24 +210,6 @@ The optional `KIND` may be one of `dylib`, `static`, or `framework`. See the
185210[ option-link ] : ../../rustc/command-line-arguments.md#option-l-link-lib
186211[ FFI ] : ../../nomicon/ffi.md
187212
188- ### ` cargo::rustc-link-arg-tests=FLAG ` {#rustc-link-arg-tests}
189-
190- The ` rustc-link-arg-tests ` instruction tells Cargo to pass the [ `-C
191- link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a
192- tests target.
193-
194- ### ` cargo::rustc-link-arg-examples=FLAG ` {#rustc-link-arg-examples}
195-
196- The ` rustc-link-arg-examples ` instruction tells Cargo to pass the [ `-C
197- link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building an examples
198- target.
199-
200- ### ` cargo::rustc-link-arg-benches=FLAG ` {#rustc-link-arg-benches}
201-
202- The ` rustc-link-arg-benches ` instruction tells Cargo to pass the [ `-C
203- link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a benchmark
204- target.
205-
206213### ` cargo::rustc-link-search=[KIND=]PATH ` {#rustc-link-search}
207214
208215The ` rustc-link-search ` instruction tells Cargo to pass the [ ` -L `
@@ -307,13 +314,6 @@ Cargo][env-cargo].
307314[ env-macro ] : ../../std/macro.env.html
308315[ env-cargo ] : environment-variables.md#environment-variables-cargo-sets-for-crates
309316
310- ### ` cargo::rustc-cdylib-link-arg=FLAG ` {#rustc-cdylib-link-arg}
311-
312- The ` rustc-cdylib-link-arg ` instruction tells Cargo to pass the [ `-C
313- link-arg=FLAG` option] [ link-arg ] to the compiler, but only when building a
314- ` cdylib ` library target. Its usage is highly platform specific. It is useful
315- to set the shared library version or the runtime-path.
316-
317317### ` cargo::error=MESSAGE ` {#cargo-error}
318318
319319The ` error ` instruction tells Cargo to display an error after the build script
0 commit comments