Use nproc and sysctl -n hw.cpu for default initializing CORES
This avoids having to pass --build-arg CORES=n when building the docker images.
This commit is contained in:
1 parent
e0f186967a
commit
99e2fefc9d
9 files changed
+13
-7
No files matched your search
@@ -25,6 +25,8 @@ if [ -z "$PREFIX" ]; then
|
||||
fi
|
||||
export PATH=$PREFIX/bin:$PATH
|
||||
|
||||
: ${CORES:=$(nproc 2>/dev/null)}
|
||||
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
||||
: ${CORES:=4}
|
||||
: ${ARCHS:=${TOOLCHAIN_ARCHS-i686 x86_64 armv7 aarch64}}
|
||||
|
||||
|
||||
Reference in new issue
Block a user