[Build] Add TOO_MANY_CORES

The JDK needs a *lot* of RAM to compile, and this scales with the number of jobs you run. This variable should make it a little more tolerable.
This commit is contained in:
Eva Isabella Luna 2025-05-28 20:43:38 -06:00 committed by GitHub
parent 8ce5f0e16a
commit cc365ba733
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -140,6 +140,12 @@ else
jobs=$(nproc)
fi
# Failsafe environment variable for computers with too many cores
# i.e. Cart's 7K62
if [[ "$TOO_MANY_CORES" == "1" ]]; then
jobs=6
fi
echo Running ${jobs} jobs to build the jdk
cd build/${JVM_PLATFORM}-${TARGET_JDK}-${JVM_VARIANTS}-${JDK_DEBUG_LEVEL}