build.sh: Stop thread allocation on dual-threaded devices

This commit is contained in:
2025-10-28 11:03:47 +03:00
parent caff1510f9
commit a45b7332cc

View File

@@ -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
}