Skip to content

Commit 7f0e9ec

Browse files
committed
Auto merge of #113730 - belovdv:jobserver-init-check, r=petrochenkov
Report errors in jobserver inherited through environment variables This pr attempts to catch situations, when jobserver exists, but is not being inherited. r? `@petrochenkov`
2 parents 2c84ae0 + 84aeb72 commit 7f0e9ec

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

cargo-miri/src/phases.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -501,6 +501,14 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner
501501
// Set missing env vars. We prefer build-time env vars over run-time ones; see
502502
// <https://github.com/rust-lang/miri/issues/1661> for the kind of issue that fixes.
503503
for (name, val) in info.env {
504+
// `CARGO_MAKEFLAGS` contains information about how to reach the
505+
// jobserver, but by the time the program is being run, that jobserver
506+
// no longer exists. Hence we shouldn't forward this.
507+
// FIXME: Miri builds the final crate without a jobserver.
508+
// This may be fixed with github.com/rust-lang/cargo/issues/12597.
509+
if name == "CARGO_MAKEFLAGS" {
510+
continue;
511+
}
504512
if let Some(old_val) = env::var_os(&name) {
505513
if old_val == val {
506514
// This one did not actually change, no need to re-set it.

0 commit comments

Comments
 (0)