Use all cores for building for iOS

This commit is contained in:
Duy Tran Khanh 2022-08-21 08:03:37 +07:00 committed by GitHub
parent 04541bd3e0
commit 8f6eb6f060
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -98,10 +98,16 @@ if [ "$error_code" -ne 0 ]; then
exit $error_code
fi
jobs=4
if [ "$BUILD_IOS" == "1" ]; then
jobs=$(sysctl -n hw.ncpu)
fi
cd build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-${JDK_DEBUG_LEVEL}
make JOBS=4 images || \
make JOBS=$jobs images || \
error_code=$?
if [ "$error_code" -ne 0 ]; then
echo "Build failure, exited with code $error_code. Trying again."
make JOBS=4 images
make JOBS=$jobs images
fi