Rollup merge of #144010 - xdoardo:bootstrap-warning-optimize-false, r=clubby789
Boostrap: add warning on `optimize = false` I recently came across a bug that can be traced back to the use of `optimize = false` in `bootstrap.toml` in combination with other settings. Following [this](https://rust-lang.zulipchat.com/#narrow/channel/182449-t-compiler.2Fhelp/topic/Missing.20box-related.20symbols.20with.20panic.20.3D.20'abort'/with/528992909) conversation, this PR adds a warning from `bootstrap` when `optimize = false` is used. I notice that in the same file I edited there are two different styles for warnings (`WARN`, `Warning`). I used `WARNING` because, by happenstance, when testing I got a `WARNING` that I didn't set a change id: let me know if I can unify the styles in the file I edited.
This commit is contained in:
commit
3023a287fa
1 changed files with 8 additions and 0 deletions
|
|
@ -531,6 +531,14 @@ impl Config {
|
|||
lld_enabled = lld_enabled_toml;
|
||||
std_features = std_features_toml;
|
||||
|
||||
if optimize_toml.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
|
||||
eprintln!(
|
||||
"WARNING: setting `optimize` to `false` is known to cause errors and \
|
||||
should be considered unsupported. Refer to `bootstrap.example.toml` \
|
||||
for more details."
|
||||
);
|
||||
}
|
||||
|
||||
optimize = optimize_toml;
|
||||
self.rust_new_symbol_mangling = new_symbol_mangling;
|
||||
set(&mut self.rust_optimize_tests, optimize_tests);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue