From ebc8b8de19d641c37ab7959a224bcd0ff4c0833f Mon Sep 17 00:00:00 2001 From: Ryan Carsten Schmidt Date: Fri, 12 Apr 2024 19:31:13 -0500 Subject: [PATCH] CI: Use only the active CPUs on macOS hw.ncpu counts all CPUs including inactive ones. hw.activecpu counts only the active CPUs. (cherry picked from commit 97f0ee0f1f903f4e7c4ea23e9b89d687025d2992) --- build-aux/ci_build.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"