]> git.lizzy.rs Git - rust.git/blobdiff - src/librustc/middle/dependency_format.rs
Change --crate-type metadata to --emit=metadata
[rust.git] / src / librustc / middle / dependency_format.rs
index 075b3d7a8e90c9e2588bac8f87a5d7dc0f175e75..662b5a2e2e21edc4170d835b73fd4ed4ac840048 100644 (file)
@@ -103,6 +103,10 @@ pub fn calculate(sess: &session::Session) {
 
 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).
@@ -114,7 +118,7 @@ fn calculate_type(sess: &session::Session,
 
         // 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.