]> git.lizzy.rs Git - rust.git/commitdiff
Remove CARGO_BUILD_TARGET from bootstrap.py
authorlzutao <taolzu@gmail.com>
Sat, 21 Mar 2020 14:54:01 +0000 (21:54 +0700)
committerGitHub <noreply@github.com>
Sat, 21 Mar 2020 14:54:01 +0000 (21:54 +0700)
src/bootstrap/bootstrap.py

index 50e1726240fffd29936c469d15386e60fad3a52b..d5efed61b541e8fccf24852e4d4a499da6d5fb05 100644 (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()