pub(super) fn flags_env(
plain: &'static str,
encoded: &'static str,
flags: &str,
) -> (&'static str, String)Expand description
Picks the environment variable and value to pass a set of Rustflags to cargo.
flags is the \x1f-separated string built by Rustflags. We prefer the plain,
space-separated form (RUSTFLAGS/RUSTDOCFLAGS) so the command stays readable and
copy-pasteable in bootstrap’s debug output, and only fall back to the CARGO_ENCODED_* form
(which keeps the \x1f separators) when a flag value contains a space that the plain,
whitespace-split form can’t represent. See https://github.com/rust-lang/rust/issues/158749.