From fa56c5f4a2fff2a0363c6dfad7f0f6f74bb3e299 Mon Sep 17 00:00:00 2001 From: "Arnout Vandecappelle (Essensium/Mind)" Date: Thu, 12 May 2022 14:12:17 +0200 Subject: [PATCH] package/nodejs: use ninja for build Not only is ninja much faster, it also avoids the following build failure: make[3]: printf: Argument list too long This failure happens when the output directory is about 6 levels deep. It's due to the make generator of gyp that uses some crazy shell processing for splitting up paths on /. The ninja generator does no such thing. While we're at it, remove redundant parenthesis in HOST_NODEJS_CONFIGURE_CMDS. Signed-off-by: Arnout Vandecappelle (Essensium/Mind) Signed-off-by: Yann E. MORIN --- package/nodejs/nodejs.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/package/nodejs/nodejs.mk b/package/nodejs/nodejs.mk index 708d5ac411..cfd9295d4e 100644 --- a/package/nodejs/nodejs.mk +++ b/package/nodejs/nodejs.mk @@ -9,6 +9,7 @@ NODEJS_SOURCE = node-v$(NODEJS_VERSION).tar.xz NODEJS_SITE = http://nodejs.org/dist/v$(NODEJS_VERSION) NODEJS_DEPENDENCIES = \ host-nodejs \ + host-ninja \ host-pkgconf \ host-python3 \ host-qemu \ @@ -20,6 +21,7 @@ NODEJS_DEPENDENCIES = \ HOST_NODEJS_DEPENDENCIES = \ host-icu \ host-libopenssl \ + host-ninja \ host-pkgconf \ host-python3 \ host-zlib @@ -37,7 +39,8 @@ NODEJS_CONF_OPTS = \ --without-dtrace \ --without-etw \ --cross-compiling \ - --dest-os=linux + --dest-os=linux \ + --ninja HOST_NODEJS_MAKE_OPTS = \ $(HOST_CONFIGURE_OPTS) \ @@ -82,7 +85,7 @@ NODEJS_CONF_OPTS += --without-npm endif define HOST_NODEJS_CONFIGURE_CMDS - (cd $(@D); \ + cd $(@D); \ $(HOST_CONFIGURE_OPTS) \ PATH=$(@D)/bin:$(BR_PATH) \ PYTHON=$(HOST_DIR)/bin/python3 \ @@ -96,7 +99,7 @@ define HOST_NODEJS_CONFIGURE_CMDS --shared-zlib \ --no-cross-compiling \ --with-intl=system-icu \ - ) + --ninja endef NODEJS_HOST_TOOLS_V8 = \