about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorlzutao <taolzu@gmail.com>2020-03-21 21:54:01 +0700
committerGitHub <noreply@github.com>2020-03-21 21:54:01 +0700
commita39e96407a579abbf4c273dc41692b69717b2aa8 (patch)
treefb1c6a85d3abce608dd1a9bc3e344b441f8b1f62 /src/bootstrap
parent98803c182b2ba6ef5dccb6bf501958249295eac0 (diff)
Remove CARGO_BUILD_TARGET from bootstrap.py
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/bootstrap.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 50e1726240f..d5efed61b54 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -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()