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
@@ -22,6 +22,8 @@ if [ -z "$PREFIX" ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
: ${CORES:=$(nproc 2>/dev/null)}
|
||||
: ${CORES:=$(sysctl -n hw.ncpu 2>/dev/null)}
|
||||
: ${CORES:=4}
|
||||
|
||||
if [ ! -d llvm ]; then
|
||||
|
||||
Reference in new issue
Block a user