Skip to content

Commit 715fab4

Browse files
author
Jon Gjengset
committed
Update docs
1 parent 055a243 commit 715fab4

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

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

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -334,16 +334,23 @@ 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`].
337+
* `RUSTC_WRAPPER` — the `rustc` wrapper, if any, that Cargo is using.
338+
See [`build.rustc-wrapper`].
339339
* `RUSTC_LINKER` — The path to the linker binary that Cargo has resolved to use
340340
for the current target, if specified. The linker can be
341341
changed by editing `.cargo/config.toml`; see the documentation
342342
about [cargo configuration][cargo-config] for more
343343
information.
344-
* `CARGO_RUSTFLAGS` — the `RUSTFLAGS` that Cargo invokes `rustc` with.
345-
See [`build.rustflags`].
344+
* `RUSTFLAGS` — the `RUSTFLAGS` that Cargo invokes `rustc` with.
345+
See [`build.rustflags`].
346346
* `CARGO_PKG_<var>` - The package information variables, with the same names and values as are [provided during crate building][variables set for crates].
347+
* `CARGO_VERSION` - The version of cargo used to invoke the build
348+
script. Its constituent parts are also available as
349+
`CARGO_VERSION_MAJOR`, `_MINOR`, and `_PATCH`.
350+
* `RUSTC_VERSION` - The version of rustc used by the cargo that invokes
351+
the build script. Its constituent parts are also
352+
available as `CARGO_VERSION_MAJOR`, `_MINOR`, and
353+
`_PATCH`.
347354

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

0 commit comments

Comments
 (0)