build.sh: Stop thread allocation on dual-threaded devices
This commit is contained in:
7
build.sh
7
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user