Skip to content

Commit

Permalink
Set RUSTC_BOOTSTRAP=1 consistently unless manually configured
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <work@onurozkan.dev>
  • Loading branch information
onur-ozkan committed Jan 18, 2024
1 parent c485ee7 commit 32f6f2a
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -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", "")
Expand Down

0 comments on commit 32f6f2a

Please sign in to comment.