Skip to content

Commit f4c3412

Browse files
committed
Query linux for number of processing units for make parallelism
1 parent c2448f4 commit f4c3412

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

utils/build-script-impl

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -194,11 +194,19 @@ function to_varname() {
194194
}
195195

196196
function get_make_parallelism() {
197-
if [ "$(uname -s)" == "Darwin" ] ; then
198-
sysctl -n hw.activecpu
199-
else
200-
echo 8
201-
fi
197+
case "$(uname -s)" in
198+
Linux)
199+
nproc
200+
;;
201+
202+
Darwin)
203+
sysctl -n hw.activecpu
204+
;;
205+
206+
*)
207+
echo 8
208+
;;
209+
esac
202210
}
203211

204212
function get_dsymutil_parallelism() {

0 commit comments

Comments
 (0)