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
|
-DANDROID_STL=c++_static
|
||||||
done
|
done
|
||||||
|
|
||||||
|
CORES=$(($(nproc --all) - 2))
|
||||||
|
[ $CORES -eq 0 ] && CORES=2
|
||||||
|
|
||||||
for a in ${TARGET_ABI_LIST[@]}; do
|
for a in ${TARGET_ABI_LIST[@]}; do
|
||||||
echo "Building $a artifacts... Using $(($(nproc) - 2)) thread."
|
echo "Building $a artifacts... Using $CORES thread."
|
||||||
cmake --build build_$a -j$(($(nproc) - 2))
|
cmake --build build_$a -j$CORES
|
||||||
echo "$a build complete, artifacts: $PWD/build_$a"
|
echo "$a build complete, artifacts: $PWD/build_$a"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user