Set RUSTC_BOOTSTRAP=1 consistently

Signed-off-by: onur-ozkan <work@onurozkan.dev>
This commit is contained in:
onur-ozkan 2024-01-18 15:50:40 +03:00
parent c485ee7147
commit 21b4fe222f

View File

@ -924,14 +924,17 @@ class RustBuild(object):
# default toolchain is not nightly. # default toolchain is not nightly.
# #
# But that setting has the collateral effect of rust-analyzer also # But that setting has the collateral effect of rust-analyzer also
# passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various # passing RUSTC_BOOTSTRAP=1 to all x.py invocations too (the various overrideCommand).
# overrideCommand). For compiling bootstrap, that is unwanted and can # For compiling bootstrap that can cause spurious rebuilding of bootstrap when
# cause spurious rebuilding of bootstrap when rust-analyzer x.py # rust-analyzer x.py invocations are interleaved with handwritten ones on the
# invocations are interleaved with handwritten ones on the command line. # command line.
env.pop("RUSTC_BOOTSTRAP", None) #
# Set RUSTC_BOOTSTRAP=1 consistently.
env["RUSTC_BOOTSTRAP"] = "1"
# preserve existing RUSTFLAGS default_rustflags = "" if env.get("RUSTFLAGS_BOOTSTRAP", "") else "-Zallow-features="
env.setdefault("RUSTFLAGS", "")
env.setdefault("RUSTFLAGS", default_rustflags)
target_features = [] target_features = []
if self.get_toml("crt-static", build_section) == "true": if self.get_toml("crt-static", build_section) == "true":