update comment about CARGO_MAKEFLAGS

This commit is contained in:
Ralf Jung 2024-01-22 08:59:12 +01:00
parent 70e720bc68
commit 80874d3f21

View File

@ -501,11 +501,10 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner
// Set missing env vars. We prefer build-time env vars over run-time ones; see // Set missing env vars. We prefer build-time env vars over run-time ones; see
// <https://github.com/rust-lang/miri/issues/1661> for the kind of issue that fixes. // <https://github.com/rust-lang/miri/issues/1661> for the kind of issue that fixes.
for (name, val) in info.env { for (name, val) in info.env {
// `CARGO_MAKEFLAGS` contains information about how to reach the // `CARGO_MAKEFLAGS` contains information about how to reach the jobserver, but by the time
// jobserver, but by the time the program is being run, that jobserver // the program is being run, that jobserver no longer exists (cargo only runs the jobserver
// no longer exists. Hence we shouldn't forward this. // for the build portion of `cargo run`/`cargo test`). Hence we shouldn't forward this.
// FIXME: Miri builds the final crate without a jobserver. // Also see <https://github.com/rust-lang/rust/pull/113730>.
// This may be fixed with github.com/rust-lang/cargo/issues/12597.
if name == "CARGO_MAKEFLAGS" { if name == "CARGO_MAKEFLAGS" {
continue; continue;
} }