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 <jhofstee@victronenergy.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
This commit is contained in:
Jeroen Hofstee
2026-06-17 14:06:40 +02:00
committed by Khem Raj
parent 82dcaab4fb
commit 011850d5d1
@@ -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")