Warn that the name is ignored if a link target is emitted
This commit is contained in:
parent
d40d01bd0e
commit
37829af09d
@ -1335,9 +1335,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 output name requested with -o for \"link\" output because \
|
||||
multiple outputs were requested");
|
||||
None
|
||||
} else {
|
||||
Some(out_file.clone())
|
||||
|
Loading…
x
Reference in New Issue
Block a user