Auto merge of #116532 - onur-ozkan:enable-rustflags-bootstrap-on-bootstrap, r=albertlarsan68
Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilation Adds `RUSTFLAGS_BOOTSTRAP` to `RUSTFLAGS` for bootstrap compilation when `RUSTFLAGS_BOOTSTRAP` exists in the environment. With this PR, `RUSTFLAGS_BOOTSTRAP` will affect every build(as we already do for rustc and std) compiled with stage0 compiler. Resolves #94234
This commit is contained in:
commit
cdddcd3bea
1 changed files with 7 additions and 0 deletions
|
@ -954,6 +954,13 @@ class RustBuild(object):
|
|||
if deny_warnings:
|
||||
env["RUSTFLAGS"] += " -Dwarnings"
|
||||
|
||||
# Add RUSTFLAGS_BOOTSTRAP to RUSTFLAGS for bootstrap compilation.
|
||||
# Note that RUSTFLAGS_BOOTSTRAP should always be added to the end of
|
||||
# RUSTFLAGS to be actually effective (e.g., if we have `-Dwarnings` in
|
||||
# RUSTFLAGS, passing `-Awarnings` from RUSTFLAGS_BOOTSTRAP should override it).
|
||||
if "RUSTFLAGS_BOOTSTRAP" in env:
|
||||
env["RUSTFLAGS"] += " " + env["RUSTFLAGS_BOOTSTRAP"]
|
||||
|
||||
env["PATH"] = os.path.join(self.bin_root(), "bin") + \
|
||||
os.pathsep + env["PATH"]
|
||||
if not os.path.isfile(self.cargo()):
|
||||
|
|
Loading…
Add table
Reference in a new issue