Skip to content

Commit

Permalink
Fix __NumProc setup if nproc is not available (#51002)
Browse files Browse the repository at this point in the history
  • Loading branch information
gbalykov authored May 1, 2021
1 parent 27a62d9 commit bad6ea0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion eng/native/build-commons.sh
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,11 @@ elif [[ "$platform" == "NetBSD" || "$platform" == "SunOS" ]]; then
elif [[ "$platform" == "Darwin" ]]; then
__NumProc=$(($(getconf _NPROCESSORS_ONLN)+1))
else
__NumProc=$(nproc --all)
if command -v nproc > /dev/null 2>&1; then
__NumProc=$(nproc --all)
else
__NumProc=1
fi
fi

while :; do
Expand Down

0 comments on commit bad6ea0

Please sign in to comment.