diff options
author | Ryan Carsten Schmidt <git@ryandesign.com> | 2024-04-12 19:31:13 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-04-12 19:31:13 -0500 |
commit | 97f0ee0f1f903f4e7c4ea23e9b89d687025d2992 (patch) | |
tree | ffe696093fa2b325421a88aae78b89b2de35bad6 | |
parent | ci: rename ci_build.sh -> ci_build.bash (diff) | |
download | xz-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-x | build-aux/ci_build.bash | 2 |
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" |