Better CPU count detection when choosing build threads.

This commit is contained in:
casey langen 2023-09-10 15:09:39 -07:00
parent dc6e779e9f
commit ab325546ce
2 changed files with 7 additions and 0 deletions

View File

@ -12,6 +12,11 @@ fi
OS=$(uname)
JOBS="-j8"
if [[ $OS == "Darwin" ]]; then
JOBS="-j$(sysctl -n hw.ncpu)"
elif nproc &> /dev/null; then
JOBS="-j$(nproc)"
fi
FRIENDLY_OS_NAME="linux"
if [[ $OS == "Darwin" ]]; then

View File

@ -41,6 +41,8 @@ LIBDIR="$OUTDIR/lib"
JOBS="-j8"
if [[ $OS == "Darwin" ]]; then
JOBS="-j$(sysctl -n hw.ncpu)"
elif nproc &> /dev/null; then
JOBS="-j$(nproc)"
fi
OPENSSL_TYPE="linux-${ARCH}"