From 32f6f2af4535170e3ca40b12888072ec2229c1fa Mon Sep 17 00:00:00 2001 From: onur-ozkan Date: Thu, 18 Jan 2024 15:50:40 +0300 Subject: [PATCH] Set RUSTC_BOOTSTRAP=1 consistently unless manually configured Signed-off-by: onur-ozkan --- src/bootstrap/bootstrap.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 6f3be1f6e938a..0c8f09a728e81 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -924,11 +924,14 @@ def build_bootstrap_cmd(self, env): # 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) + # 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 unless manually configured. + if 'RUSTC_BOOTSTRAP' not in env: + env['RUSTC_BOOTSTRAP'] = '1' # preserve existing RUSTFLAGS env.setdefault("RUSTFLAGS", "")