Auto merge of #10896 - RalfJung:rustc-wrapper, r=ehuss

expand RUSTC_WRAPPER docs

Fixes https://github.com/rust-lang/cargo/issues/10886
This commit is contained in:
bors 2022-07-24 20:13:57 +00:00
commit 27f4f0243f
2 changed files with 15 additions and 10 deletions

View File

@ -361,7 +361,8 @@ Sets the executable to use for `rustc`.
* Environment: `CARGO_BUILD_RUSTC_WRAPPER` or `RUSTC_WRAPPER` * Environment: `CARGO_BUILD_RUSTC_WRAPPER` or `RUSTC_WRAPPER`
Sets a wrapper to execute instead of `rustc`. The first argument passed to the Sets a wrapper to execute instead of `rustc`. The first argument passed to the
wrapper is the path to the actual `rustc`. wrapper is the path to the actual executable to use
(i.e., `build.rustc`, if that is set, or `"rustc"` otherwise).
##### `build.rustc-workspace-wrapper` ##### `build.rustc-workspace-wrapper`
* Type: string (program path) * Type: string (program path)
@ -369,7 +370,8 @@ wrapper is the path to the actual `rustc`.
* Environment: `CARGO_BUILD_RUSTC_WORKSPACE_WRAPPER` or `RUSTC_WORKSPACE_WRAPPER` * Environment: `CARGO_BUILD_RUSTC_WORKSPACE_WRAPPER` or `RUSTC_WORKSPACE_WRAPPER`
Sets a wrapper to execute instead of `rustc`, for workspace members only. Sets a wrapper to execute instead of `rustc`, for workspace members only.
The first argument passed to the wrapper is the path to the actual `rustc`. The first argument passed to the wrapper is the path to the actual
executable to use (i.e., `build.rustc`, if that is set, or `"rustc"` otherwise).
It affects the filename hash so that artifacts produced by the wrapper are cached separately. It affects the filename hash so that artifacts produced by the wrapper are cached separately.
##### `build.rustdoc` ##### `build.rustdoc`

View File

@ -21,15 +21,18 @@ system:
* `RUSTC` — Instead of running `rustc`, Cargo will execute this specified * `RUSTC` — Instead of running `rustc`, Cargo will execute this specified
compiler instead. See [`build.rustc`] to set via config. compiler instead. See [`build.rustc`] to set via config.
* `RUSTC_WRAPPER` — Instead of simply running `rustc`, Cargo will execute this * `RUSTC_WRAPPER` — Instead of simply running `rustc`, Cargo will execute this
specified wrapper instead, passing as its command-line arguments the rustc specified wrapper, passing as its command-line arguments the rustc
invocation, with the first argument being `rustc`. Useful to set up a build invocation, with the first argument being the path to the actual rustc.
cache tool such as `sccache`. See [`build.rustc-wrapper`] to set via config. Useful to set up a build cache tool such as `sccache`. See
* `RUSTC_WORKSPACE_WRAPPER` — Instead of simply running `rustc`, Cargo will [`build.rustc-wrapper`] to set via config. Setting this to the empty string
execute this specified wrapper instead for workspace members only, passing overwrites the config and resets cargo to not use a wrapper.
* `RUSTC_WORKSPACE_WRAPPER` — Instead of simply running `rustc`, for workspace
members Cargo will execute this specified wrapper, passing
as its command-line arguments the rustc invocation, with the first argument as its command-line arguments the rustc invocation, with the first argument
being `rustc`. It affects the filename hash so that artifacts produced by being the path to the actual rustc. It affects the filename hash
the wrapper are cached separately. See [`build.rustc-workspace-wrapper`] so that artifacts produced by the wrapper are cached separately.
to set via config. See [`build.rustc-workspace-wrapper`] to set via config. Setting this to the empty string
overwrites the config and resets cargo to not use a wrapper for workspace members.
* `RUSTDOC` — Instead of running `rustdoc`, Cargo will execute this specified * `RUSTDOC` — Instead of running `rustdoc`, Cargo will execute this specified
`rustdoc` instance instead. See [`build.rustdoc`] to set via config. `rustdoc` instance instead. See [`build.rustdoc`] to set via config.
* `RUSTDOCFLAGS` — A space-separated list of custom flags to pass to all `rustdoc` * `RUSTDOCFLAGS` — A space-separated list of custom flags to pass to all `rustdoc`