Skip to content

Commit

Permalink
Prefer llvm-skip-rebuild flag value over config.toml
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Healy committed Jan 10, 2020
1 parent 0bbbd5d commit 7e50b59
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/bootstrap/config.rs
Expand Up @@ -493,9 +493,13 @@ impl Config {
config.mandir = install.mandir.clone().map(PathBuf::from);
}

// We want the llvm-skip-rebuild flag to take precedence over the
// skip-rebuild config.toml option so we store it separately
// so that we can infer the right value
let mut llvm_skip_rebuild = flags.llvm_skip_rebuild;

// Store off these values as options because if they're not provided
// we'll infer default values for them later
let mut llvm_skip_rebuild = None;
let mut llvm_assertions = None;
let mut debug = None;
let mut debug_assertions = None;
Expand All @@ -517,7 +521,7 @@ impl Config {
}
set(&mut config.ninja, llvm.ninja);
llvm_assertions = llvm.assertions;
llvm_skip_rebuild = llvm.skip_rebuild;
llvm_skip_rebuild = llvm_skip_rebuild.or(llvm.skip_rebuild);
set(&mut config.llvm_optimize, llvm.optimize);
set(&mut config.llvm_thin_lto, llvm.thin_lto);
set(&mut config.llvm_release_debuginfo, llvm.release_debuginfo);
Expand Down

0 comments on commit 7e50b59

Please sign in to comment.