about summary refs log tree commit diff
diff options
context:
space:
mode:
authorvarkor <github@varkor.com>2018-03-22 23:58:36 +0000
committervarkor <github@varkor.com>2018-03-22 23:58:36 +0000
commit2a5f3ee0c5b51c4d3aa4c6ab1cb7f3ffe1687c41 (patch)
tree48a388fac853cd0da14c303f06165b5bea731b5e
parent5092c6b01acbff60935a5e6d84f83b6c73c1ca5e (diff)
downloadrust-2a5f3ee0c5b51c4d3aa4c6ab1cb7f3ffe1687c41.tar.gz
rust-2a5f3ee0c5b51c4d3aa4c6ab1cb7f3ffe1687c41.zip
Make --emit=metadata output metadata regardless of link
-rw-r--r--src/librustc_trans/back/link.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs
index bdda7741221..168570df464 100644
--- a/src/librustc_trans/back/link.rs
+++ b/src/librustc_trans/back/link.rs
@@ -146,9 +146,7 @@ pub(crate) fn link_binary(sess: &Session,
     let mut out_filenames = Vec::new();
     for &crate_type in sess.crate_types.borrow().iter() {
         // Ignore executable crates if we have -Z no-trans, as they will error.
-        if (sess.opts.debugging_opts.no_trans ||
-            !sess.opts.output_types.should_trans()) &&
-           crate_type == config::CrateTypeExecutable {
+        if sess.opts.debugging_opts.no_trans && crate_type == config::CrateTypeExecutable {
             continue;
         }