about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-09 04:57:36 +0000
committerbors <bors@rust-lang.org>2017-01-09 04:57:36 +0000
commitf5cfe83da96ffeadccfab240d7995b5ade274e6f (patch)
tree47e062544def9f81fda7a8dbb8e8e1ee31943909 /src
parentaee21e2594c0dfe07f074be0da95c95b5b65ed50 (diff)
parent4af830a2c83b6e54d2979d63ece51a2f157e7bae (diff)
downloadrust-f5cfe83da96ffeadccfab240d7995b5ade274e6f.tar.gz
rust-f5cfe83da96ffeadccfab240d7995b5ade274e6f.zip
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!
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/driver.rs7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/librustc_driver/driver.rs b/src/librustc_driver/driver.rs
index 63abc09a076..442c139f14c 100644
--- a/src/librustc_driver/driver.rs
+++ b/src/librustc_driver/driver.rs
@@ -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())