From: Ryan Carsten Schmidt Date: Sat, 13 Apr 2024 00:31:13 +0000 (-0500) Subject: CI: Use only the active CPUs on macOS X-Git-Tag: v5.7.1alpha~395 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F108%2Fhead;p=thirdparty%2Fxz.git CI: Use only the active CPUs on macOS hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts only the active CPUs. --- diff --git a/build-aux/ci_build.bash b/build-aux/ci_build.bash index d40cd3ce..50e98f4c 100755 --- a/build-aux/ci_build.bash +++ b/build-aux/ci_build.bash @@ -48,7 +48,7 @@ DEST_DIR="$SRC_DIR/../xz_build" PHASE="all" ARTIFACTS_DIR_NAME="output" -[[ -z ${CPU_COUNT} ]] && { CPU_COUNT=$(nproc 2>/dev/null || sysctl -n hw.ncpu); } +[[ -z ${CPU_COUNT} ]] && { CPU_COUNT=$(nproc 2>/dev/null || sysctl -n hw.activecpu); } [[ -z ${MAKEFLAGS} ]] && export MAKEFLAGS="-j${CPU_COUNT} -l${CPU_COUNT}" [[ -z ${CFLAGS} ]] && export CFLAGS="-O2"