about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap.py
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-01-19 08:42:17 +0000
committerbors <bors@rust-lang.org>2024-01-19 08:42:17 +0000
commit92d727796be7c882d2efbc06e08bbf4743cf29dc (patch)
treedfa01ef8715c67165d86640add0cdd9f89aa8a18 /src/bootstrap/bootstrap.py
parent16fadb3f252bcfc5ee3f0be09472c9600a052202 (diff)
parent9c6795baab8bc343c8573ea4ea4c2b550f6bc0ac (diff)
downloadrust-92d727796be7c882d2efbc06e08bbf4743cf29dc.tar.gz
rust-92d727796be7c882d2efbc06e08bbf4743cf29dc.zip
Auto merge of #120112 - matthiaskrgr:rollup-48o3919, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #119582 (bootstrap: handle vendored sources when remapping crate paths)
 - #119730 (docs: fix typos)
 - #119828 (Improved collapse_debuginfo attribute, added command-line flag)
 - #119869 (replace `track_errors` usages with bubbling up `ErrorGuaranteed`)
 - #120037 (Remove `next_root_ty_var`)
 - #120094 (tests/ui/asm/inline-syntax: adapt for LLVM 18)
 - #120096 (Set RUSTC_BOOTSTRAP=1 consistently)
 - #120101 (change `.unwrap()` to `?` on write where `fmt::Result` is returned)
 - #120102 (Fix typo in munmap_partial.rs)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/bootstrap/bootstrap.py')
-rw-r--r--src/bootstrap/bootstrap.py19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py
index 6f3be1f6e93..28d96cb1cfe 100644
--- a/src/bootstrap/bootstrap.py
+++ b/src/bootstrap/bootstrap.py
@@ -924,14 +924,17 @@ class RustBuild(object):
         # default toolchain is not nightly.
         #
         # But that setting has the collateral effect of rust-analyzer also
-        # passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various
-        # overrideCommand). For compiling bootstrap, that is unwanted and can
-        # cause spurious rebuilding of bootstrap when rust-analyzer x.py
-        # invocations are interleaved with handwritten ones on the command line.
-        env.pop("RUSTC_BOOTSTRAP", None)
-
-        # preserve existing RUSTFLAGS
-        env.setdefault("RUSTFLAGS", "")
+        # passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various overrideCommand).
+        # For compiling bootstrap that can cause spurious rebuilding of bootstrap when
+        # rust-analyzer x.py invocations are interleaved with handwritten ones on the
+        # command line.
+        #
+        # Set RUSTC_BOOTSTRAP=1 consistently.
+        env["RUSTC_BOOTSTRAP"] = "1"
+
+        default_rustflags = "" if env.get("RUSTFLAGS_BOOTSTRAP", "") else "-Zallow-features="
+
+        env.setdefault("RUSTFLAGS", default_rustflags)
 
         target_features = []
         if self.get_toml("crt-static", build_section) == "true":