Skip to content

Commit 32f6f2a

Browse files
committed
Set RUSTC_BOOTSTRAP=1 consistently unless manually configured
Signed-off-by: onur-ozkan <[email protected]>
1 parent c485ee7 commit 32f6f2a

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

src/bootstrap/bootstrap.py

+8-5
Original file line numberDiff line numberDiff line change
@@ -924,11 +924,14 @@ def build_bootstrap_cmd(self, env):
924924
# default toolchain is not nightly.
925925
#
926926
# But that setting has the collateral effect of rust-analyzer also
927-
# passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various
928-
# overrideCommand). For compiling bootstrap, that is unwanted and can
929-
# cause spurious rebuilding of bootstrap when rust-analyzer x.py
930-
# invocations are interleaved with handwritten ones on the command line.
931-
env.pop("RUSTC_BOOTSTRAP", None)
927+
# passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various overrideCommand).
928+
# For compiling bootstrap that can cause spurious rebuilding of bootstrap when
929+
# rust-analyzer x.py invocations are interleaved with handwritten ones on the
930+
# command line.
931+
#
932+
# Set RUSTC_BOOTSTRAP=1 consistently unless manually configured.
933+
if 'RUSTC_BOOTSTRAP' not in env:
934+
env['RUSTC_BOOTSTRAP'] = '1'
932935

933936
# preserve existing RUSTFLAGS
934937
env.setdefault("RUSTFLAGS", "")

0 commit comments

Comments
 (0)