aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Carsten Schmidt <git@ryandesign.com>2024-04-12 19:31:13 -0500
committerGitHub <noreply@github.com>2024-04-12 19:31:13 -0500
commit97f0ee0f1f903f4e7c4ea23e9b89d687025d2992 (patch)
treeffe696093fa2b325421a88aae78b89b2de35bad6
parentci: rename ci_build.sh -> ci_build.bash (diff)
downloadxz-97f0ee0f1f903f4e7c4ea23e9b89d687025d2992.tar.xz
CI: Use only the active CPUs on macOS
hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts only the active CPUs.
Diffstat (limited to '')
-rwxr-xr-xbuild-aux/ci_build.bash2
1 files changed, 1 insertions, 1 deletions
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"