Skip to content

Commit 44491ee

Browse files
author
Jon Gjengset
committed
Document build script envvars for rustc context
1 parent bdf49cb commit 44491ee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/doc/src/reference/environment-variables.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,11 +334,15 @@ let out_dir = env::var("OUT_DIR").unwrap();
334334
* `RUSTC`, `RUSTDOC` — the compiler and documentation generator that Cargo has
335335
resolved to use, passed to the build script so it might
336336
use it as well.
337+
* `CARGO_RUSTC_WRAPPER` — the `rustc` wrapper, if any, that Cargo is using.
338+
See [`build.rustc-wrapper`].
337339
* `RUSTC_LINKER` — The path to the linker binary that Cargo has resolved to use
338340
for the current target, if specified. The linker can be
339341
changed by editing `.cargo/config.toml`; see the documentation
340342
about [cargo configuration][cargo-config] for more
341343
information.
344+
* `CARGO_RUSTFLAGS` — the `RUSTFLAGS` that Cargo invokes `rustc` with.
345+
See [`build.rustflags`].
342346
* `CARGO_PKG_<var>` - The package information variables, with the same names and values as are [provided during crate building][variables set for crates].
343347

344348
[unix-like platforms]: ../../reference/conditional-compilation.html#unix-and-windows

0 commit comments

Comments
 (0)