1
Fork 0

Rollup merge of #94524 - bjorn3:remove_num_cpus, r=Mark-Simulacrum

Remove num_cpus dependency from bootstrap, build-manifest and rustc_s…

…ession

`std::threads::available_parallelism` was stabilized in rust 1.59.

r? ```````````````````````````@Mark-Simulacrum```````````````````````````
This commit is contained in:
Matthias Krüger 2022-03-04 17:31:05 +01:00 committed by GitHub
commit 5115bdc2e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 7 additions and 11 deletions

View file

@ -551,7 +551,7 @@ mod parse {
crate fn parse_threads(slot: &mut usize, v: Option<&str>) -> bool {
match v.and_then(|s| s.parse().ok()) {
Some(0) => {
*slot = ::num_cpus::get();
*slot = std::thread::available_parallelism().map_or(1, std::num::NonZeroUsize::get);
true
}
Some(i) => {