Reintroduce prepending the input file name to the miri arguments
This commit is contained in:
parent
7d142ecf75
commit
ecae3751b4
1 changed files with 5 additions and 1 deletions
|
|
@ -42,8 +42,12 @@ impl rustc_driver::Callbacks for MiriCompilerCalls {
|
|||
|
||||
compiler.global_ctxt().unwrap().peek_mut().enter(|tcx| {
|
||||
let (entry_def_id, _) = tcx.entry_fn(LOCAL_CRATE).expect("no main function found!");
|
||||
let mut config = self.miri_config.clone();
|
||||
|
||||
miri::eval_main(tcx, entry_def_id, self.miri_config.clone());
|
||||
// Add filename to `miri` arguments.
|
||||
config.args.insert(0, compiler.input().filestem().to_string());
|
||||
|
||||
miri::eval_main(tcx, entry_def_id, config);
|
||||
});
|
||||
|
||||
compiler.session().abort_if_errors();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue