Revert "Revert "Remove num_cpus dependency from bootstrap, build-manifest and rustc_session""

This reverts commit 1ae4b25826.
This commit is contained in:
The 8472 2022-08-15 16:24:07 +02:00
parent 6ce76091c7
commit 84531229bb
10 changed files with 7 additions and 11 deletions

View file

@ -582,7 +582,7 @@ mod parse {
pub(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) => {