From 2a5f3ee0c5b51c4d3aa4c6ab1cb7f3ffe1687c41 Mon Sep 17 00:00:00 2001 From: varkor Date: Thu, 22 Mar 2018 23:58:36 +0000 Subject: [PATCH] Make --emit=metadata output metadata regardless of link --- src/librustc_trans/back/link.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/librustc_trans/back/link.rs b/src/librustc_trans/back/link.rs index bdda7741221f..168570df464e 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; }