From a45b7332cc0061467fbf8261e1ba3a3e329e0196 Mon Sep 17 00:00:00 2001 From: YZBruh Date: Tue, 28 Oct 2025 11:03:47 +0300 Subject: [PATCH] build.sh: Stop thread allocation on dual-threaded devices --- build.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.sh b/build.sh index 6460932..2ec6070 100755 --- a/build.sh +++ b/build.sh @@ -61,9 +61,12 @@ build() { -DANDROID_STL=c++_static done + CORES=$(($(nproc --all) - 2)) + [ $CORES -eq 0 ] && CORES=2 + for a in ${TARGET_ABI_LIST[@]}; do - echo "Building $a artifacts... Using $(($(nproc) - 2)) thread." - cmake --build build_$a -j$(($(nproc) - 2)) + echo "Building $a artifacts... Using $CORES thread." + cmake --build build_$a -j$CORES echo "$a build complete, artifacts: $PWD/build_$a" done }