Auto merge of #38840 - kjaleshire:multiple-targets-error-fix, r=nrc
Warn that the link target ignores the given name Hi, new contributor here. This is my stab at #20130, any feedback welcome!
This commit is contained in:
commit
f5cfe83da9
1 changed files with 4 additions and 3 deletions
|
|
@ -1334,9 +1334,10 @@ pub fn build_output_filenames(input: &Input,
|
|||
.values()
|
||||
.filter(|a| a.is_none())
|
||||
.count();
|
||||
let ofile = if unnamed_output_types > 1 {
|
||||
sess.warn("ignoring specified output filename because multiple outputs were \
|
||||
requested");
|
||||
let ofile = if unnamed_output_types > 1 &&
|
||||
sess.opts.output_types.contains_key(&OutputType::Exe) {
|
||||
sess.warn("ignoring specified output filename for 'link' output because multiple \
|
||||
outputs were requested");
|
||||
None
|
||||
} else {
|
||||
Some(out_file.clone())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue