"Change BUILD_JOBS=8" to match the threads on the computer itself. (#264)

Now works for macOS and Linux.
* Update build-toolchain.bash
This commit is contained in:
IoIxD 2024-08-02 09:55:09 -07:00 committed by GitHub
parent 929acbb3c8
commit 018c064180
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -23,10 +23,7 @@ SRC=$(cd `dirname $0` && pwd -P)
DEFAULT_PREFIX=`pwd -P`/toolchain/
PREFIX=$DEFAULT_PREFIX
BINUTILS=`pwd -P`/binutils-build
BUILD_JOBS=8
if [ $(uname) == "Linux" ]; then
BUILD_JOBS=$(grep processor /proc/cpuinfo | wc -l)
fi
BUILD_JOBS=$(nproc || sysctl -n hw.physicalcpu)
##################### Prerequisites check