Skip to content

Commit 79dd148

Browse files
Rollup merge of #51317 - oli-obk:incremental_all_the_way, r=Mark-Simulacrum
Allow enabling incremental via config.toml r? @QuietMisdreavus
2 parents b35c60e + 3b02376 commit 79dd148

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

config.toml.example

+3
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,9 @@
279279
# Whether or not `panic!`s generate backtraces (RUST_BACKTRACE)
280280
#backtrace = true
281281

282+
# Whether to always use incremental compilation when building rustc
283+
#incremental = false
284+
282285
# Build rustc with experimental parallelization
283286
#experimental-parallel-queries = false
284287

src/bootstrap/config.rs

+5
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,7 @@ struct Rust {
303303
dist_src: Option<bool>,
304304
quiet_tests: Option<bool>,
305305
test_miri: Option<bool>,
306+
incremental: Option<bool>,
306307
save_toolstates: Option<String>,
307308
codegen_backends: Option<Vec<String>>,
308309
codegen_backends_dir: Option<String>,
@@ -529,6 +530,10 @@ impl Config {
529530
set(&mut config.rust_dist_src, rust.dist_src);
530531
set(&mut config.quiet_tests, rust.quiet_tests);
531532
set(&mut config.test_miri, rust.test_miri);
533+
// in the case "false" is set explicitly, do not overwrite the command line args
534+
if let Some(true) = rust.incremental {
535+
config.incremental = true;
536+
}
532537
set(&mut config.wasm_syscall, rust.wasm_syscall);
533538
set(&mut config.lld_enabled, rust.lld);
534539
config.rustc_parallel_queries = rust.experimental_parallel_queries.unwrap_or(false);

0 commit comments

Comments
 (0)