Revert "Revert "Remove num_cpus dependency from bootstrap, build-manifest and rustc_session""
This reverts commit 1ae4b25826
.
This commit is contained in:
parent
6ce76091c7
commit
84531229bb
10 changed files with 7 additions and 11 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue