about summary refs log tree commit diff
path: root/src/bootstrap
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2018-10-04 12:39:37 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2018-10-04 12:39:37 +0200
commitac4945c1cbdee5800a53c7afe180b290291cefe1 (patch)
tree71e9a9f42d090962cbab6d3a4dd13e11cef92b31 /src/bootstrap
parent088fc7384c1ac3f7670d66880c7dcc0ec9160c79 (diff)
downloadrust-ac4945c1cbdee5800a53c7afe180b290291cefe1.tar.gz
rust-ac4945c1cbdee5800a53c7afe180b290291cefe1.zip
Fix #24840: make default for `optimize` independent of `debug` setting in `Cargo.toml`.
Diffstat (limited to 'src/bootstrap')
-rw-r--r--src/bootstrap/config.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bootstrap/config.rs b/src/bootstrap/config.rs
index 3a4bc526d03..3250594e4f4 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);