Skip to content

Commit 0e423f4

Browse files
committed
Boostrap: add warning on optimize = false
1 parent 231257f commit 0e423f4

File tree

1 file changed

+8
-0
lines changed
  • src/bootstrap/src/core/config/toml

1 file changed

+8
-0
lines changed

src/bootstrap/src/core/config/toml/rust.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,14 @@ impl Config {
541541
lld_enabled = lld_enabled_toml;
542542
std_features = std_features_toml;
543543

544+
if optimize_toml.as_ref().is_some_and(|v| matches!(v, RustOptimize::Bool(false))) {
545+
eprintln!(
546+
"WARNING: setting `optimize` to `false` is known to cause errors and \
547+
should be considered unsupported. Refer to `bootstrap.example.toml` \
548+
for more details."
549+
);
550+
}
551+
544552
optimize = optimize_toml;
545553
self.rust_new_symbol_mangling = new_symbol_mangling;
546554
set(&mut self.rust_optimize_tests, optimize_tests);

0 commit comments

Comments
 (0)