rustc: Fix an ICE when -o bare-path
rustc will ICE if you specify an outfile path that is bare without a directory. As a workaround, before this -o ./foo will work
This commit is contained in:
parent
668c647408
commit
8ac528bed1
1 changed files with 4 additions and 1 deletions
|
|
@ -954,8 +954,11 @@ pub fn build_output_filenames(input: &Input,
|
|||
if *odir != None {
|
||||
sess.warn("ignoring --out-dir flag due to -o flag.");
|
||||
}
|
||||
|
||||
let cur_dir = Path::new("");
|
||||
|
||||
OutputFilenames {
|
||||
out_directory: out_file.parent().unwrap().to_path_buf(),
|
||||
out_directory: out_file.parent().unwrap_or(cur_dir).to_path_buf(),
|
||||
out_filestem: out_file.file_stem().unwrap()
|
||||
.to_str().unwrap().to_string(),
|
||||
single_output_file: ofile,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue