Skip to content

Commit

Permalink
docs: clarify target.'cfg(...)' doesnt respect cfg from build script
Browse files Browse the repository at this point in the history
This was a mistake, see #14306
  • Loading branch information
weihanglo committed Sep 30, 2024
1 parent fe50f67 commit 828c7ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/doc/src/reference/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -1173,9 +1173,9 @@ rustflags = ["…", "…"]
```

`cfg` values come from those built-in to the compiler (run `rustc --print=cfg`
to view), values set by [build scripts], and extra `--cfg` flags passed to
`rustc` (such as those defined in `RUSTFLAGS`). Do not try to match on
`debug_assertions` or Cargo features like `feature="foo"`.
to view) and extra `--cfg` flags passed to `rustc` (such as those defined in
`RUSTFLAGS`). Do not try to match on `debug_assertions`, `test`, Cargo features
like `feature="foo"`, or values set by [build scripts].

If using a target spec JSON file, the [`<triple>`] value is the filename stem.
For example `--target foo/bar.json` would match `[target.bar]`.
Expand Down

0 comments on commit 828c7ef

Please sign in to comment.