about summary refs log tree commit diff
diff options
context:
space:
mode:
authorAlex Crichton <alex@alexcrichton.com>2017-08-28 18:32:29 -0700
committerAlex Crichton <alex@alexcrichton.com>2017-08-28 18:32:29 -0700
commit7007a44cf28dafb11deb595b63fcdfa82cc24a03 (patch)
treec5aa077fb80ac115e4015c2f91ff53d927b123ef
parent5caca6fa0213cadca1584db43dd71fb5f82b41b9 (diff)
downloadrust-7007a44cf28dafb11deb595b63fcdfa82cc24a03.tar.gz
rust-7007a44cf28dafb11deb595b63fcdfa82cc24a03.zip
rustbuild: Fix uplifting stage1 on cross builds
When we pass `--host` the `self.hosts` array doesn't contain `self.build`, so
check `self.build` to see if we can uplift.
-rw-r--r--src/bootstrap/lib.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bootstrap/lib.rs b/src/bootstrap/lib.rs
index 55358f2ffcb..645037a9211 100644
--- a/src/bootstrap/lib.rs
+++ b/src/bootstrap/lib.rs
@@ -718,7 +718,7 @@ impl Build {
     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