fn calculate_type(sess: &session::Session,
ty: config::CrateType) -> DependencyList {
+ if sess.opts.output_types.contains_key(&config::OutputType::Metadata) {
+ return Vec::new();
+ }
+
match ty {
// If the global prefer_dynamic switch is turned off, first attempt
// static linkage (this can fail).
// No linkage happens with rlibs, we just needed the metadata (which we
// got long ago), so don't bother with anything.
- config::CrateTypeRlib | config::CrateTypeMetadata => return Vec::new(),
+ config::CrateTypeRlib => return Vec::new(),
// Staticlibs and cdylibs must have all static dependencies. If any fail
// to be found, we generate some nice pretty errors.