Skip to content

Commit

Permalink
CI: Use only the active CPUs on macOS
Browse files Browse the repository at this point in the history
hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts
only the active CPUs.
  • Loading branch information
ryandesign authored Apr 13, 2024
1 parent 73f629e commit 97f0ee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion build-aux/ci_build.bash
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down

0 comments on commit 97f0ee0

Please sign in to comment.