]> git.lizzy.rs Git - rust.git/commitdiff
Warn that the name is ignored if a link target is emitted
authorKyle Aleshire <kjaleshire@gmail.com>
Thu, 5 Jan 2017 00:23:19 +0000 (18:23 -0600)
committer <kja@monolith.localdomain> <>
Thu, 5 Jan 2017 01:54:21 +0000 (19:54 -0600)
src/librustc_driver/driver.rs

index e9c14b4f99c2224847f41f98e7b97baa1f7fd09f..536728308b03d36887dc3519a9cba00de5ccb2b9 100644 (file)
@@ -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())