Skip to content

Commit 6b4dd23

Browse files
committed
Auto merge of #7650 - ehuss:config-docs, r=Eh2406
Update config and environment variable docs. Various updates to try to clarify and expand the documentation for config variables and environment variables. Closes #4041 Closes #7610 Closes #7571 Closes #5780 Closes #5690
2 parents 4dacb9d + dd8f7d8 commit 6b4dd23

File tree

4 files changed

+911
-188
lines changed

4 files changed

+911
-188
lines changed

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

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -363,21 +363,22 @@ Cargo [configuration location](config.md).
363363

364364
```toml
365365
[target.x86_64-unknown-linux-gnu.foo]
366-
rustc-link-search = ["/path/to/foo"]
367366
rustc-link-lib = ["foo"]
368-
root = "/path/to/foo"
369-
key = "value"
367+
rustc-link-search = ["/path/to/foo"]
368+
rustc-flags = "-L /some/path"
369+
rustc-cfg = ['key="value"']
370+
rustc-env = {key = "value"}
371+
rustc-cdylib-link-arg = [""]
372+
metadata_key1 = "value"
373+
metadata_key2 = "value"
370374
```
371375

372-
This section states that for the target `x86_64-unknown-linux-gnu` the library
373-
named `foo` has the metadata specified. This metadata is the same as the
374-
metadata generated as if the build script had run, providing a number of
375-
key/value pairs where the `rustc-flags`, `rustc-link-search`, and
376-
`rustc-link-lib` keys are slightly special.
377-
378376
With this configuration, if a package declares that it links to `foo` then the
379377
build script will **not** be compiled or run, and the metadata specified will
380-
instead be used.
378+
be used instead.
379+
380+
The `warning`, `rerun-if-changed`, and `rerun-if-env-changed` keys should not
381+
be used and will be ignored.
381382

382383
### Jobserver
383384

0 commit comments

Comments
 (0)