Skip to content

Commit adff3c5

Browse files
committed
Move -Zjit-mode from bin/miri.rs to cargo-miri
1 parent 037f86f commit adff3c5

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
@@ -597,6 +597,8 @@ pub fn phase_runner(mut binary_args: impl Iterator<Item = String>, phase: Runner
597597
cmd.args(args);
598598
}
599599

600+
cmd.arg("-Zjit-mode");
601+
600602
// Then pass binary arguments.
601603
cmd.arg("--");
602604
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
@@ -550,7 +550,6 @@ fn main() {
550550

551551
let mut rustc_args = vec![];
552552
let mut after_dashdash = false;
553-
let mut guest_args = vec![];
554553

555554
// Note that we require values to be given with `=`, not with a space.
556555
// This matches how rustc parses `-Z`.
@@ -563,9 +562,10 @@ fn main() {
563562
rustc_args.extend(miri::MIRI_DEFAULT_ARGS.iter().map(ToString::to_string));
564563
} else if after_dashdash {
565564
// Everything that comes after `--` is forwarded to the interpreted crate.
566-
guest_args.push(arg);
565+
rustc_args.push(arg);
567566
} else if arg == "--" {
568567
after_dashdash = true;
568+
rustc_args.push("--".to_owned());
569569
} else if arg == "-Zmiri-disable-validation" {
570570
miri_config.validation = ValidationMode::No;
571571
} else if arg == "-Zmiri-recursive-validation" {
@@ -820,9 +820,6 @@ fn main() {
820820
);
821821
}
822822
}
823-
rustc_args.push("-Zjit-mode".to_owned());
824-
rustc_args.push("--".to_owned());
825-
rustc_args.extend(guest_args);
826823

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

src/tools/miri/tests/ui.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ fn run_tests(
197197
}
198198
}
199199
config.program.args.push("-Zui-testing".into());
200+
config.program.args.push("-Zjit-mode".into());
200201

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

0 commit comments

Comments
 (0)