Skip to content

Commit 52eea4b

Browse files
committed
Auto merge of #158357 - petrochenkov:benchsync, r=<try>
[experiment] Benchmark `-Zthreads=sync` on rustc-perf benchmarks
2 parents 73100ee + 3faa0ed commit 52eea4b

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

compiler/rustc_session/src/options.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,7 +1105,7 @@ pub mod parse {
11051105
// We want to cap the number of threads here to avoid large numbers like 999999 and compiler panics.
11061106
// This solution was suggested here https://github.com/rust-lang/rust/issues/117638#issuecomment-1800925067
11071107
let n = n.min(MAX_THREADS_CAP);
1108-
*slot = (n > 1).then_some(n); // Enable synchronization if we're using more than one thread.
1108+
*slot = Some(n);
11091109
true
11101110
}
11111111

@@ -2753,7 +2753,7 @@ written to standard error output)"),
27532753
/// in the future. Note that -Zthreads=0 is the way to get
27542754
/// the num_cpus behavior.
27552755
#[rustc_lint_opt_deny_field_access("use `Session::threads` instead of this field")]
2756-
threads: Option<usize> = (None, parse_threads, [UNTRACKED],
2756+
threads: Option<usize> = (Some(1), parse_threads, [UNTRACKED],
27572757
"use a thread pool with N threads"),
27582758
time_llvm_passes: bool = (false, parse_bool, [UNTRACKED],
27592759
"measure time of each LLVM pass (default: no)"),

0 commit comments

Comments
 (0)