From 011850d5d17709b120f98cda63a864498bd2fed7 Mon Sep 17 00:00:00 2001 From: Jeroen Hofstee Date: Wed, 17 Jun 2026 14:06:40 +0200 Subject: [PATCH] nodejs: native: avoid target-specific signatures The do_create_v8_qemu_wrapper function depends on target information, which ends up in the task signature, but the qemu wrapper isn't needed for native builds. This causes unnecessary rebuilds of nodejs-native. Delete the task for nodejs-native and don't install the wrapper script for it. This issue was previously addressed by b2a950a ("nodejs: inherit qemu class conditionally"), which was later reverted. This patch addresses it by removing the unused task from native builds instead of inheriting qemu conditionally. Signed-off-by: Jeroen Hofstee Signed-off-by: Khem Raj --- meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb index ff40a09656..89f32f2063 100644 --- a/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb +++ b/meta-oe/recipes-devtools/nodejs/nodejs_24.16.0.bb @@ -150,9 +150,12 @@ do_configure () { ${PACKAGECONFIG_CONFARGS} } +do_compile:prepend:class-target() { + install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh +} + do_compile () { install -D ${RECIPE_SYSROOT_NATIVE}/etc/ssl/openssl.cnf ${B}/deps/openssl/nodejs-openssl.cnf - install -D ${B}/v8-qemu-wrapper.sh ${B}/out/Release/v8-qemu-wrapper.sh oe_runmake BUILDTYPE=Release } @@ -199,6 +202,13 @@ python set_gyp_variables () { } python __anonymous () { + # do_create_v8_qemu_wrapper is not needed for the native build, so make sure it + # gets deleted otherwise target info ends up in its signature making the native + # build target specific. + if bb.data.inherits_class('native', d): + bb.build.deltask('do_create_v8_qemu_wrapper', d) + return + # 32 bit target and 64 bit host (x86-64 or aarch64) have different bit width if d.getVar("SITEINFO_BITS") == "32" and "64" in d.getVar("BUILD_ARCH"): d.setVar("HOST_AND_TARGET_SAME_WIDTH", "0")