Rollup merge of #70228 - lzutao:patch-1, r=Mark-Simulacrum

Remove CARGO_BUILD_TARGET from bootstrap.py

Closes #70208
This commit is contained in:
Dylan DPC 2020-03-21 22:56:27 +01:00 committed by GitHub
commit 6e9720d452
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -664,6 +664,10 @@ class RustBuild(object):
if self.clean and os.path.exists(build_dir):
shutil.rmtree(build_dir)
env = os.environ.copy()
# `CARGO_BUILD_TARGET` breaks bootstrap build.
# See also: <https://github.com/rust-lang/rust/issues/70208>.
if "CARGO_BUILD_TARGET" in env:
del env["CARGO_BUILD_TARGET"]
env["RUSTC_BOOTSTRAP"] = '1'
env["CARGO_TARGET_DIR"] = build_dir
env["RUSTC"] = self.rustc()