summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2019-05-30 16:25:51 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2019-05-30 16:25:51 (EDT)
commitfc7c3879276543a99ebde0df43e0412461da1843 (patch)
tree84bd8b0f8a9ba9fe68a53241e665e0b85505361e /build
parent400015f120430f09fa9c3732b48ced1fa73c1930 (diff)
build: Base jobs on number of CPUs
This is how BusyBox's `nproc --all` works. It's Linux-specific, but the alternatives are the (BusyBox) nproc utility (non-standard and currently disabled in ProteanOS) and the getconf utility (standard but provided by glibc and not in musl) with the _NPROCESSORS_ONLN operand (non-standard but common in standard C libraries).
Diffstat (limited to 'build')
-rwxr-xr-xbuild2
1 files changed, 1 insertions, 1 deletions
diff --git a/build b/build
index 299b291..ff2d7dd 100755
--- a/build
+++ b/build
@@ -96,7 +96,7 @@ dir_macros = \
extra_opts =
native_target = bootstrap-lean
cross_target = all-gcc
-jobs = 4
+jobs = $$(printf '%s\n' /sys/devices/system/cpu/cpu[0-9]* | wc -l)
include ../local.mk
# For example, to disable bootstrapping, set these in local.mk:
# extra_opts = --disable-bootstrap