Skip to content

Commit

Permalink
Unrolled build for rust-lang#118059
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#118059 - Nilstrieb:unset-cargo, r=dtolnay

Explicitly unset $CARGO for compiletest

Some UI tests trigger behavior in rustc where it reads $CARGO and changes behavior if it exists. To make the tests work that rely on it not being set, make sure it is not set.

By default, this is not set, but people may do weird hacks that cause it to be set.

closes rust-lang#118058
  • Loading branch information
rust-timer authored Nov 21, 2023
2 parents 85c42b7 + 251e75c commit 0130abd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/bootstrap/src/core/build_steps/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,11 @@ NOTE: if you're sure you want to do this, please open an issue as to why. In the
}
}
}

// Some UI tests trigger behavior in rustc where it reads $CARGO and changes behavior if it exists.
// To make the tests work that rely on it not being set, make sure it is not set.
cmd.env_remove("CARGO");

cmd.env("RUSTC_BOOTSTRAP", "1");
// Override the rustc version used in symbol hashes to reduce the amount of normalization
// needed when diffing test output.
Expand Down

0 comments on commit 0130abd

Please sign in to comment.