File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -924,14 +924,17 @@ 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 )
932-
933- # preserve existing RUSTFLAGS
934- env .setdefault ("RUSTFLAGS" , "" )
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.
933+ env ["RUSTC_BOOTSTRAP" ] = "1"
934+
935+ default_rustflags = "" if env .get ("RUSTFLAGS_BOOTSTRAP" , "" ) else "-Zallow-features="
936+
937+ env .setdefault ("RUSTFLAGS" , default_rustflags )
935938
936939 target_features = []
937940 if self .get_toml ("crt-static" , build_section ) == "true" :
You can’t perform that action at this time.
0 commit comments