Skip to content

Commit 03294f8

Browse files
authored
1 parent 47a4650 commit 03294f8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/doc/src/reference/specifying-dependencies.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,19 @@ Like with Rust, the syntax here supports the `not`, `any`, and `all` operators
461461
to combine various cfg name/value pairs. Note that the `cfg` syntax has only
462462
been available since Cargo 0.9.0 (Rust 1.8.0).
463463

464+
If you want to know which cfg targets are available on your platform, run
465+
`rustc --print=cfg` from the command line. If you want to know which `cfg`
466+
targets are available for another platform, such as 64-bit Windows,
467+
run `rustc --print=cfg --target=x86_64-pc-windows-msvc`.
468+
If you want to know which cfg targets are used by the release profile,
469+
add the `-O` parameter.
470+
471+
This same set of values is used throughout the build for all crates in your project,
472+
so, unlike in your Rust source code,
473+
you cannot use `[target.'cfg(feature = "my_crate")'.dependencies]` to add
474+
dependencies based on optional crate features.
475+
Use [the `[features]` section](manifest.md#the-features-section) instead.
476+
464477
In addition to `#[cfg]` syntax, Cargo also supports listing out the full target
465478
the dependencies would apply to:
466479

0 commit comments

Comments
 (0)