package/nodejs: fix parallel build further
Commit84c24ab1b5
(package/nodejs: fix parallel build) made use of BR2_JLEVEL to set the number of jobs nodejs should use instead of using the number of CPUs (+2). However, BR2_JLEVEL can be set to 0 by the user, to let Buildroot detect the number of CPUs (+1), and stores it in PARALLEL_JOBS, and leaves BR2_JLEVEL untouched, so 0. Thus, we can end up spawning a build by passing -j0 to ninja, which it interprets as "no -limit yolo" and does not limit the number oj jobs it spawns, which usually ends up in an OOM somewhere... Fix this by using PARALLEL_JOBS. Reported-by: Cédric & Co Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commitd574e2a4f4
) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
789502a583
commit
3095614111
@ -47,7 +47,7 @@ HOST_NODEJS_MAKE_OPTS = \
|
||||
LDFLAGS.host="$(HOST_LDFLAGS)" \
|
||||
NO_LOAD=cctest.target.mk \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
JOBS=$(BR2_JLEVEL)
|
||||
JOBS=$(PARALLEL_JOBS)
|
||||
|
||||
NODEJS_MAKE_OPTS = \
|
||||
$(TARGET_CONFIGURE_OPTS) \
|
||||
@ -55,7 +55,7 @@ NODEJS_MAKE_OPTS = \
|
||||
PATH=$(@D)/bin:$(BR_PATH) \
|
||||
LDFLAGS="$(NODEJS_LDFLAGS)" \
|
||||
LD="$(TARGET_CXX)" \
|
||||
JOBS=$(BR2_JLEVEL)
|
||||
JOBS=$(PARALLEL_JOBS)
|
||||
|
||||
# nodejs's build system uses python which can be a symlink to an unsupported
|
||||
# python version (e.g. python 3.10 with nodejs 14.18.1). We work around this by
|
||||
|
Loading…
Reference in New Issue
Block a user