Skip to content

Commit 4987e9d

Browse files
Auto merge of #146237 - zetanumbers:parallel-frontend-by-default, r=<try>
Test out parallel frontend via crater
2 parents c7f6aa2 + 77f6c01 commit 4987e9d

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

compiler/rustc_session/src/options.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2656,12 +2656,8 @@ written to standard error output)"),
26562656
#[rustc_lint_opt_deny_field_access("use `Session::lto` instead of this field")]
26572657
thinlto: Option<bool> = (None, parse_opt_bool, [TRACKED],
26582658
"enable ThinLTO when possible"),
2659-
/// We default to 1 here since we want to behave like
2660-
/// a sequential compiler for now. This'll likely be adjusted
2661-
/// in the future. Note that -Zthreads=0 is the way to get
2662-
/// the num_cpus behavior.
26632659
#[rustc_lint_opt_deny_field_access("use `Session::threads` instead of this field")]
2664-
threads: usize = (1, parse_threads, [UNTRACKED],
2660+
threads: usize = (std::thread::available_parallelism().map_or(1, NonZero::get), parse_threads, [UNTRACKED],
26652661
"use a thread pool with N threads"),
26662662
time_llvm_passes: bool = (false, parse_bool, [UNTRACKED],
26672663
"measure time of each LLVM pass (default: no)"),

0 commit comments

Comments
 (0)