Skip to content

Commit

Permalink
Auto merge of #7650 - ehuss:config-docs, r=Eh2406
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bors committed Dec 3, 2019
2 parents 4dacb9d + dd8f7d8 commit 6b4dd23
Show file tree
Hide file tree
Showing 4 changed files with 911 additions and 188 deletions.
21 changes: 11 additions & 10 deletions src/doc/src/reference/build-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,21 +363,22 @@ Cargo [configuration location](config.md).

```toml
[target.x86_64-unknown-linux-gnu.foo]
rustc-link-search = ["/path/to/foo"]
rustc-link-lib = ["foo"]
root = "/path/to/foo"
key = "value"
rustc-link-search = ["/path/to/foo"]
rustc-flags = "-L /some/path"
rustc-cfg = ['key="value"']
rustc-env = {key = "value"}
rustc-cdylib-link-arg = [""]
metadata_key1 = "value"
metadata_key2 = "value"
```

This section states that for the target `x86_64-unknown-linux-gnu` the library
named `foo` has the metadata specified. This metadata is the same as the
metadata generated as if the build script had run, providing a number of
key/value pairs where the `rustc-flags`, `rustc-link-search`, and
`rustc-link-lib` keys are slightly special.

With this configuration, if a package declares that it links to `foo` then the
build script will **not** be compiled or run, and the metadata specified will
instead be used.
be used instead.

The `warning`, `rerun-if-changed`, and `rerun-if-env-changed` keys should not
be used and will be ignored.

### Jobserver

Expand Down
Loading

0 comments on commit 6b4dd23

Please sign in to comment.