Skip to content

Commit 0893ea1

Browse files
committed
Rustup
This gets Miri building again after the `run_compiler` changes
1 parent 9d4c80e commit 0893ea1

File tree

4 files changed

+7
-10
lines changed

4 files changed

+7
-10
lines changed

benches/helpers/miri_helper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,5 +55,5 @@ pub fn run(filename: &str, bencher: &mut Bencher) {
5555
"--sysroot".to_string(),
5656
find_sysroot(),
5757
];
58-
rustc_driver::run_compiler(args, &mut MiriCompilerCalls { bencher }, None, None, None).unwrap()
58+
rustc_driver::RunCompiler::new(args, &mut MiriCompilerCalls { bencher }).run().unwrap()
5959
}

rust-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
c9ced8523bbb90561385aab305232f2167228a83
1+
06a079c43efb062e335e6e6c9dabd3c750619980

src/bin/miri-rustc-tests.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,10 @@ fn main() {
140140
let buf = BufWriter::default();
141141
let output = buf.clone();
142142
let result = std::panic::catch_unwind(|| {
143-
let _ = rustc_driver::run_compiler(
144-
&args,
145-
&mut MiriCompilerCalls { host_target },
146-
None,
147-
Some(Box::new(buf)),
148-
None,
149-
);
143+
let mut callbacks = MiriCompilerCalls { host_target };
144+
let mut run = rustc_driver::RunCompiler::new(&args, &mut callbacks);
145+
run.set_emitter(Some(Box::new(buf)));
146+
let _ = run.run();
150147
});
151148

152149
match result {

src/bin/miri.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ fn run_compiler(mut args: Vec<String>, callbacks: &mut (dyn rustc_driver::Callba
157157

158158
// Invoke compiler, and handle return code.
159159
let exit_code = rustc_driver::catch_with_exit_code(move || {
160-
rustc_driver::run_compiler(&args, callbacks, None, None, None)
160+
rustc_driver::RunCompiler::new(&args, callbacks).run()
161161
});
162162
std::process::exit(exit_code)
163163
}

0 commit comments

Comments
 (0)