Skip to content

Commit 5576ce8

Browse files
committed
Take OutputType::DepInfo into account for metadata_output_only
1 parent 8414520 commit 5576ce8

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/librustc_metadata/encoder.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use rustc::traits::specialization_graph;
2828
use rustc::ty::{self, Ty, TyCtxt, ReprOptions, SymbolName};
2929
use rustc::ty::codec::{self as ty_codec, TyEncoder};
3030

31-
use rustc::session::config::{self, CrateTypeProcMacro, OutputType};
31+
use rustc::session::config::{self, CrateTypeProcMacro};
3232
use rustc::util::nodemap::FxHashMap;
3333

3434
use rustc_data_structures::stable_hasher::StableHasher;
@@ -835,8 +835,7 @@ impl<'a, 'b: 'a, 'tcx: 'b> IsolatedEncoder<'a, 'b, 'tcx> {
835835

836836
fn metadata_output_only(&self) -> bool {
837837
// MIR optimisation can be skipped when we're just interested in the metadata.
838-
self.tcx.sess.opts.output_types.len() == 1 &&
839-
self.tcx.sess.opts.output_types.contains_key(&OutputType::Metadata)
838+
!self.tcx.sess.opts.output_types.should_trans()
840839
}
841840

842841
fn encode_info_for_impl_item(&mut self, def_id: DefId) -> Entry<'tcx> {

0 commit comments

Comments
 (0)