mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-30 23:03:06 +03:00
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:
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user