mirror of
https://git.tukaani.org/xz.git
synced 2025-02-17 14:08:12 +00:00
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)
This commit is contained in:
parent
1e63f7d536
commit
ebc8b8de19
@ -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"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user