mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-29 03:27:44 +00:00
Rustup
This gets Miri building again after the `run_compiler` changes
This commit is contained in:
parent
9d4c80e787
commit
0893ea1973
@ -55,5 +55,5 @@ pub fn run(filename: &str, bencher: &mut Bencher) {
|
|||||||
"--sysroot".to_string(),
|
"--sysroot".to_string(),
|
||||||
find_sysroot(),
|
find_sysroot(),
|
||||||
];
|
];
|
||||||
rustc_driver::run_compiler(args, &mut MiriCompilerCalls { bencher }, None, None, None).unwrap()
|
rustc_driver::RunCompiler::new(args, &mut MiriCompilerCalls { bencher }).run().unwrap()
|
||||||
}
|
}
|
||||||
|
@ -1 +1 @@
|
|||||||
c9ced8523bbb90561385aab305232f2167228a83
|
06a079c43efb062e335e6e6c9dabd3c750619980
|
||||||
|
@ -140,13 +140,10 @@ fn main() {
|
|||||||
let buf = BufWriter::default();
|
let buf = BufWriter::default();
|
||||||
let output = buf.clone();
|
let output = buf.clone();
|
||||||
let result = std::panic::catch_unwind(|| {
|
let result = std::panic::catch_unwind(|| {
|
||||||
let _ = rustc_driver::run_compiler(
|
let mut callbacks = MiriCompilerCalls { host_target };
|
||||||
&args,
|
let mut run = rustc_driver::RunCompiler::new(&args, &mut callbacks);
|
||||||
&mut MiriCompilerCalls { host_target },
|
run.set_emitter(Some(Box::new(buf)));
|
||||||
None,
|
let _ = run.run();
|
||||||
Some(Box::new(buf)),
|
|
||||||
None,
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
match result {
|
match result {
|
||||||
|
@ -157,7 +157,7 @@ fn run_compiler(mut args: Vec<String>, callbacks: &mut (dyn rustc_driver::Callba
|
|||||||
|
|
||||||
// Invoke compiler, and handle return code.
|
// Invoke compiler, and handle return code.
|
||||||
let exit_code = rustc_driver::catch_with_exit_code(move || {
|
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)
|
std::process::exit(exit_code)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user