Skip to content

Commit b2ee24e

Browse files
committed
Move -Zjit-mode from bin/miri.rs to cargo-miri
1 parent 18c3656 commit b2ee24e

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/tools/miri/cargo-miri/src/phases.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner
601601
cmd.args(args);
602602
}
603603

604+
cmd.arg("-Zjit-mode");
605+
604606
// Then pass binary arguments.
605607
cmd.arg("--");
606608
cmd.args(&binary_args);

src/tools/miri/src/bin/miri.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -549,7 +549,6 @@ fn main() -> ExitCode {
549549

550550
let mut rustc_args = vec![];
551551
let mut after_dashdash = false;
552-
let mut guest_args = vec![];
553552

554553
// Note that we require values to be given with `=`, not with a space.
555554
// This matches how rustc parses `-Z`.
@@ -562,9 +561,10 @@ fn main() -> ExitCode {
562561
rustc_args.extend(miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
563562
} else if after_dashdash {
564563
// Everything that comes after `--` is forwarded to the interpreted crate.
565-
guest_args.push(arg);
564+
rustc_args.push(arg);
566565
} else if arg == "--" {
567566
after_dashdash = true;
567+
rustc_args.push("--".to_owned());
568568
} else if arg == "-Zmiri-disable-validation" {
569569
miri_config.validation = ValidationMode::No;
570570
} else if arg == "-Zmiri-recursive-validation" {
@@ -819,9 +819,6 @@ fn main() -> ExitCode {
819819
);
820820
}
821821
}
822-
rustc_args.push("-Zjit-mode".to_owned());
823-
rustc_args.push("--".to_owned());
824-
rustc_args.extend(guest_args);
825822

826823
run_compiler_and_exit(&rustc_args, &mut MiriCompilerCalls::new(miri_config, many_seeds))
827824
}

src/tools/miri/tests/ui.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,6 +202,7 @@ fn run_tests(
202202
}
203203
}
204204
config.program.args.push("-Zui-testing".into());
205+
config.program.args.push("-Zjit-mode".into());
205206

206207
// If we're testing the native-lib functionality, then build the shared object file for testing
207208
// external C function calls and push the relevant compiler flag.

0 commit comments

Comments
 (0)