]> git.proxmox.com Git - rustc.git/blobdiff - src/bootstrap/build/sanity.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / bootstrap / build / sanity.rs
index 40f4c7076092d78f5e70dcfe16182f4fcf0a195a..6ce2749638841b4e86cdc9dd64b56926bb9d257c 100644 (file)
@@ -79,7 +79,7 @@ pub fn check(build: &mut Build) {
         }
 
         // Make sure musl-root is valid if specified
-        if target.contains("musl") {
+        if target.contains("musl") && (target.contains("x86_64") || target.contains("i686")) {
             match build.config.musl_root {
                 Some(ref root) => {
                     if fs::metadata(root.join("lib/libc.a")).is_err() {
@@ -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);
+        }
+    }
 }