This gets Miri building again after the `run_compiler` changes
This commit is contained in:
Aaron Hill 2020-10-11 17:05:40 -04:00
parent 9d4c80e787
commit 0893ea1973
No known key found for this signature in database
GPG Key ID: B4087E510E98B164
4 changed files with 7 additions and 10 deletions

View File

@ -55,5 +55,5 @@ pub fn run(filename: &str, bencher: &mut Bencher) {
"--sysroot".to_string(),
find_sysroot(),
];
rustc_driver::run_compiler(args, &mut MiriCompilerCalls { bencher }, None, None, None).unwrap()
rustc_driver::RunCompiler::new(args, &mut MiriCompilerCalls { bencher }).run().unwrap()
}

View File

@ -1 +1 @@
c9ced8523bbb90561385aab305232f2167228a83
06a079c43efb062e335e6e6c9dabd3c750619980

View File

@ -140,13 +140,10 @@ fn main() {
let buf = BufWriter::default();
let output = buf.clone();
let result = std::panic::catch_unwind(|| {
let _ = rustc_driver::run_compiler(
&args,
&mut MiriCompilerCalls { host_target },
None,
Some(Box::new(buf)),
None,
);
let mut callbacks = MiriCompilerCalls { host_target };
let mut run = rustc_driver::RunCompiler::new(&args, &mut callbacks);
run.set_emitter(Some(Box::new(buf)));
let _ = run.run();
});
match result {

View File

@ -157,7 +157,7 @@ fn run_compiler(mut args: Vec<String>, callbacks: &mut (dyn rustc_driver::Callba
// Invoke compiler, and handle return code.
let exit_code = rustc_driver::catch_with_exit_code(move || {
rustc_driver::run_compiler(&args, callbacks, None, None, None)
rustc_driver::RunCompiler::new(&args, callbacks).run()
});
std::process::exit(exit_code)
}