projects
/
platform
/
upstream
/
dotnet
/
runtime.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
27a62d9
)
Fix __NumProc setup if nproc is not available (#51002)
author
Gleb Balykov
<g.balykov@samsung.com>
Sat, 1 May 2021 18:24:00 +0000
(21:24 +0300)
committer
GitHub
<noreply@github.com>
Sat, 1 May 2021 18:24:00 +0000
(11:24 -0700)
eng/native/build-commons.sh
patch
|
blob
|
history
diff --git
a/eng/native/build-commons.sh
b/eng/native/build-commons.sh
index
63ffbba
..
e8f0b44
100755
(executable)
--- a/
eng/native/build-commons.sh
+++ b/
eng/native/build-commons.sh
@@
-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