fix MAKE_JOB_COUNT on darwin, and use it on ios and macos scripts ()

This commit is contained in:
cyan 2025-01-28 13:22:30 +01:00 committed by GitHub
parent 00906bc455
commit c3c5c8644c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View file

@ -26,7 +26,7 @@ then
export MAKE_JOB_COUNT="$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1)"
elif [[ "$(uname)" == "Darwin" ]];
then
export MAKE_JOB_COUNT="(expr $(printf '%s\n%s' $(( $(sysctl -n hw.memsize) * 4 / (1073741824 * 9) )) $(sysctl -n hw.logicalcpu) | sort -n | head -n1) '|' 1)"
export MAKE_JOB_COUNT="$(expr $(printf '%s\n%s' $(( $(sysctl -n hw.memsize) * 4 / (1073741824 * 9) )) $(sysctl -n hw.logicalcpu) | sort -n | head -n1) '|' 1)"
else
# Assume windows eh?
export MAKE_JOB_COUNT="$(expr $(printf '%s\n%s' $(( $(grep MemTotal: /proc/meminfo | cut -d: -f2 | cut -dk -f1) * 4 / (1048576 * 9) )) $(nproc) | sort -n | head -n1) '|' 1)"

View file

@ -19,7 +19,7 @@ for COIN in monero wownero zano;
do
pushd ../monero_c
rm -rf external/ios/build
./build_single.sh ${COIN} aarch64-apple-ios -j$NPROC
./build_single.sh ${COIN} aarch64-apple-ios -j$MAKE_JOB_COUNT
popd
done

View file

@ -39,7 +39,7 @@ else
WOWNERO_LIBS="$WOWNERO_LIBS -arch ${ARCH} ${WOWNEROC_RELEASE_DIR}/${HOST}_libwallet2_api_c.dylib"
pushd ../monero_c
./build_single.sh ${COIN} ${HOST} $NPROC
./build_single.sh ${COIN} ${HOST} -j$MAKE_JOB_COUNT
unxz -f ./release/${COIN}/${HOST}_libwallet2_api_c.dylib.xz
popd
done