Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add clarifications to environment-variables.md that will help people not break their builds when targeting specific CPUs #12367

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/doc/src/reference/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,12 @@ system:
see `CARGO_ENCODED_RUSTDOCFLAGS`.
* `CARGO_ENCODED_RUSTDOCFLAGS` --- A list of custom flags separated by `0x1f`
(ASCII Unit Separator) to pass to all `rustdoc` invocations that Cargo performs.
* `RUSTFLAGS` --- A space-separated list of custom flags to pass to all compiler
* `RUSTFLAGS` --- A space-separated list of custom flags to pass to *all* compiler
invocations that Cargo performs. In contrast with [`cargo rustc`], this is
useful for passing a flag to *all* compiler instances. See
[`build.rustflags`] for some more ways to set flags. This string is
[`build.rustflags`] for some more ways to set flags which will only apply to the "production" code.
Setting RUSTFLAGS incorrectly may break your build if the flags supplied result in
platform-specific code that can not run on the build host. This string is
split by whitespace; for a more robust encoding of multiple arguments,
see `CARGO_ENCODED_RUSTFLAGS`.
* `CARGO_ENCODED_RUSTFLAGS` --- A list of custom flags separated by `0x1f`
Expand Down Expand Up @@ -93,7 +95,7 @@ In summary, the supported environment variables are:
* `CARGO_BUILD_RUSTDOC` --- The `rustdoc` executable, see [`build.rustdoc`].
* `CARGO_BUILD_TARGET` --- The default target platform, see [`build.target`].
* `CARGO_BUILD_TARGET_DIR` --- The default output directory, see [`build.target-dir`].
* `CARGO_BUILD_RUSTFLAGS` --- Extra `rustc` flags, see [`build.rustflags`].
* `CARGO_BUILD_RUSTFLAGS` --- Extra `rustc` flags that are applied to the "production" code only, but not procmacros, see [`build.rustflags`].
* `CARGO_BUILD_RUSTDOCFLAGS` --- Extra `rustdoc` flags, see [`build.rustdocflags`].
* `CARGO_BUILD_INCREMENTAL` --- Incremental compilation, see [`build.incremental`].
* `CARGO_BUILD_DEP_INFO_BASEDIR` --- Dep-info relative directory, see [`build.dep-info-basedir`].
Expand Down