Locate rustc binary similarly to codegen backend loading
This ensures that the failure cases for finding the codegen backend and for finding the rustc binary are essentially the same, and since we almost always will load the codegen backend, this is essentially meaning that the rustc change is not a regression.
This commit is contained in:
@@ -248,7 +248,7 @@ fn run_test(
|
||||
};
|
||||
let output_file = outdir.path().join("rust_out");
|
||||
|
||||
let mut compiler = Command::new(std::env::current_exe().unwrap().with_file_name("rustc"));
|
||||
let mut compiler = Command::new(rustc_interface::util::rustc_path().expect("found rustc"));
|
||||
compiler.arg("--crate-type").arg("bin");
|
||||
for cfg in &options.cfgs {
|
||||
compiler.arg("--cfg").arg(&cfg);
|
||||
|
||||
Reference in New Issue
Block a user