Skip to content

Commit

Permalink
Fix #24840: make default for optimize independent of debug settin…
Browse files Browse the repository at this point in the history
…g in `Cargo.toml`.
  • Loading branch information
pnkfelix committed Oct 4, 2018
1 parent 088fc73 commit ac4945c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/bootstrap/config.rs
Expand Up @@ -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,
Expand All @@ -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);
Expand Down

0 comments on commit ac4945c

Please sign in to comment.