From ac4945c1cbdee5800a53c7afe180b290291cefe1 Mon Sep 17 00:00:00 2001 From: "Felix S. Klock II" Date: Thu, 4 Oct 2018 12:39:37 +0200 Subject: [PATCH] Fix #24840: make default for `optimize` independent of `debug` setting in `Cargo.toml`. --- src/bootstrap/config.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs index 3a4bc526d03bf..3250594e4f443 100644 --- a/src/bootstrap/config.rs +++ b/src/bootstrap/config.rs @@ -624,6 +624,9 @@ impl Config { let default = false; config.llvm_assertions = llvm_assertions.unwrap_or(default); + let default = true; + config.rust_optimize = optimize.unwrap_or(default); + let default = match &config.channel[..] { "stable" | "beta" | "nightly" => true, _ => false, @@ -636,7 +639,6 @@ impl Config { config.debug_jemalloc = debug_jemalloc.unwrap_or(default); config.rust_debuginfo = debuginfo.unwrap_or(default); config.rust_debug_assertions = debug_assertions.unwrap_or(default); - config.rust_optimize = optimize.unwrap_or(!default); let default = config.channel == "dev"; config.ignore_git = ignore_git.unwrap_or(default);