]> git.lizzy.rs Git - rust.git/commitdiff
rustbuild: Fix uplifting stage1 on cross builds
authorAlex Crichton <alex@alexcrichton.com>
Tue, 29 Aug 2017 01:32:29 +0000 (18:32 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Tue, 29 Aug 2017 01:32:29 +0000 (18:32 -0700)
When we pass `--host` the `self.hosts` array doesn't contain `self.build`, so
check `self.build` to see if we can uplift.

src/bootstrap/lib.rs

index 55358f2ffcb7334deda2c7e4ecde1180cdd9c7d6..645037a921122cb95ea4d7470097b1f945f20e4c 100644 (file)
@@ -718,7 +718,7 @@ fn python(&self) -> &Path {
     fn force_use_stage1(&self, compiler: Compiler, target: Interned<String>) -> bool {
         !self.config.full_bootstrap &&
             compiler.stage >= 2 &&
-            self.hosts.iter().any(|h| *h == target)
+            (self.hosts.iter().any(|h| *h == target) || target == self.build)
     }
 
     /// Returns the directory that OpenSSL artifacts are compiled into if