about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2018-04-05 12:03:03 -0700
committerAlex Crichton <alex@alexcrichton.com>2018-04-05 12:03:03 -0700
commitcd615e9863fa4593ff87243920875ad5bb73906a (patch)
treef42e4285226c191c4448946f440ba79642ba1080 /src
parent4d239ab14e0053edef396d8728828e1f73ce1342 (diff)
parent59059f2ed1d9ee6d23a8aba0507bac7ac6d40e48 (diff)
Rollup merge of #49705 - alexcrichton:less-manifest-docs, r=kennytm
Diffstat (limited to 'src')
-rw-r--r--src/tools/build-manifest/src/main.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/src/tools/build-manifest/src/main.rs b/src/tools/build-manifest/src/main.rs
index 49b054f8b9e..0f482c95e05 100644
--- a/src/tools/build-manifest/src/main.rs
+++ b/src/tools/build-manifest/src/main.rs
@@ -356,6 +356,28 @@ impl Builder {
                 target: "*".to_string(),
             });
 
+            // If the components/extensions don't actually exist for this
+            // particular host/target combination then nix it entirely from our
+            // lists.
+            {
+                let has_component = |c: &Component| {
+                    if c.target == "*" {
+                        return true
+                    }
+                    let pkg = match manifest.pkg.get(&c.pkg) {
+                        Some(p) => p,
+                        None => return false,
+                    };
+                    let target = match pkg.target.get(&c.target) {
+                        Some(t) => t,
+                        None => return false,
+                    };
+                    target.available
+                };
+                extensions.retain(&has_component);
+                components.retain(&has_component);
+            }
+
             pkg.target.insert(host.to_string(), Target {
                 available: true,
                 url: Some(self.url(&filename)),