aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2019-06-04 12:17:43 -0700
committerRob Landley <rob@landley.net>2019-06-05 00:14:29 -0500
commite94952c598155b9d708f3957f0003086108e8c60 (patch)
treeb3241de0df13fd9971c714e1e21e511f3760a2e7
parent81eb18b4800e73c4faa78e182dfc57bae5d2f0d6 (diff)
downloadtoybox-e94952c598155b9d708f3957f0003086108e8c60.tar.gz
macOS build parallelism.
Macs are slow enough without crippling them further!
-rwxr-xr-xscripts/make.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/make.sh b/scripts/make.sh
index bdcfadea..bd550b91 100755
--- a/scripts/make.sh
+++ b/scripts/make.sh
@@ -12,7 +12,8 @@ source scripts/portability.sh
UNSTRIPPED="generated/unstripped/$(basename "$OUTNAME")"
# Try to keep one more cc invocation going than we have processors
-[ -z "$CPUS" ] && CPUS=$(($(nproc 2>/dev/null)+1))
+[ -z "$CPUS" ] && \
+ CPUS=$(($(nproc 2>/dev/null || sysctl -n hw.ncpu 2>/dev/null)+1))
# Respond to V= by echoing command lines as well as running them
DOTPROG=