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.
This commit is contained in:
Alex Crichton
2017-08-28 18:32:29 -07:00
parent 5caca6fa02
commit 7007a44cf2

View File

@@ -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