Skip to content
Permalink
Browse files

Query linux for number of processing units for make parallelism

  • Loading branch information...
manyoso committed Dec 3, 2015
1 parent c2448f4 commit f4c341275b103a6baf7aa8d31c199a05b3d3b0bc
Showing with 13 additions and 5 deletions.
  1. +13 −5 utils/build-script-impl
@@ -194,11 +194,19 @@ function to_varname() {
}

function get_make_parallelism() {
if [ "$(uname -s)" == "Darwin" ] ; then
sysctl -n hw.activecpu
else
echo 8
fi
case "$(uname -s)" in
Linux)
nproc
;;

Darwin)
sysctl -n hw.activecpu
;;

*)
echo 8
;;
esac

This comment has been minimized.

Copy link
@pixelb

pixelb Dec 8, 2015

Sometimes it's simpler and more generic to just try each in turn:

{ sysctl -n hw.activecpu || nproc || echo 8; } 2>/dev/null
}

function get_dsymutil_parallelism() {

0 comments on commit f4c3412

Please sign in to comment.
You can’t perform that action at this time.