1
Fork 0

Remove num_cpus dependency from bootstrap, build-manifest and rustc_session

This commit is contained in:
bjorn3 2022-03-02 15:22:32 +01:00
parent c42d846add
commit 2d854f9c34
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) => {