diff options
| author | onur-ozkan <work@onurozkan.dev> | 2023-10-08 13:41:56 +0300 |
|---|---|---|
| committer | onur-ozkan <work@onurozkan.dev> | 2023-10-08 13:41:56 +0300 |
| commit | 89d610cd06f90cd6bd0bccdb395a3127290e1b45 (patch) | |
| tree | bc8257a9a9b14404b48360cd684247deaa2ecb72 /src/bootstrap | |
| parent | 91db3bdc8cefa5a9bd58b8fbc3ce5ef1859b4b93 (diff) | |
| download | rust-89d610cd06f90cd6bd0bccdb395a3127290e1b45.tar.gz rust-89d610cd06f90cd6bd0bccdb395a3127290e1b45.zip | |
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). Signed-off-by: onur-ozkan <work@onurozkan.dev>
Diffstat (limited to 'src/bootstrap')
| -rw-r--r-- | src/bootstrap/bootstrap.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bootstrap/bootstrap.py b/src/bootstrap/bootstrap.py index 4af97b2f466..1a1125a107f 100644 --- a/src/bootstrap/bootstrap.py +++ b/src/bootstrap/bootstrap.py @@ -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()): |
