Skip to content

Boostrap: add warning on optimize = false #144010

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 18, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/bootstrap/src/core/config/toml/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,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);
Expand Down
Loading