about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2016-04-05 10:00:51 -0700
committerAlex Crichton <alex@alexcrichton.com>2016-04-06 10:13:02 -0700
commit4e758722f4f9ccf9054ebf179b8630a37ce954f1 (patch)
tree8bc4dadc19b91ec7ae08e1b6902fc39370b53b65 /src/bootstrap
parentc86e7c49500d7abc03f1377997b445896c74f020 (diff)
downloadrust-4e758722f4f9ccf9054ebf179b8630a37ce954f1.tar.gz
rust-4e758722f4f9ccf9054ebf179b8630a37ce954f1.zip
rustbuild: Verify flags are configured
Building with `--target foo` should fail because that target wasn't actually
validated.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/build/sanity.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/bootstrap/build/sanity.rs b/src/bootstrap/build/sanity.rs
index be4416c697c..6ce27496388 100644
--- a/src/bootstrap/build/sanity.rs
+++ b/src/bootstrap/build/sanity.rs
@@ -119,4 +119,16 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
             }
         }
     }
+
+    for host in build.flags.host.iter() {
+        if !build.config.host.contains(host) {
+            panic!("specified host `{}` is not in the ./configure list", host);
+        }
+    }
+    for target in build.flags.target.iter() {
+        if !build.config.target.contains(target) {
+            panic!("specified target `{}` is not in the ./configure list",
+                   target);
+        }
+    }
 }