Skip to content

build: support setting an emulator from configure script - #53899

Merged
aduh95 merged 1 commit into
nodejs:mainfrom
tie:emulator
Jun 25, 2026
Merged

aduh95 merged 1 commit into
nodejs:mainfrom
tie:emulator

Conversation

@tie

@tie tie commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

V8’s JIT infrastructure requires binaries such as mksnapshot to be run during the build. However, these binaries must have the same bit-width as the host platform (e.g. a x86_64 build platform targeting ARMv6 needs to produce a 32-bit binary).

To work around this issue, allow building the binaries for the host platform and running them on the build platform with an emulator.

Based on Buildroot’s nodejs-src 0001-add-qemu-wrapper-support.patch. https://gitlab.com/buildroot.org/buildroot/-/blob/c1d5eada4d4db9eeaa1c44dd1dea95a67c8a70ca/package/nodejs/nodejs-src/0001-add-qemu-wrapper-support.patch

See also NixOS/nixpkgs#327653

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/gyp
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to Node.js builds or CI infrastructure. needs-ci PRs that need a full CI run. tools Issues and PRs related to the tools directory. v8 engine Issues and PRs related to the V8 dependency. labels Jul 17, 2024
@tie

tie commented Jul 17, 2024

Copy link
Copy Markdown
Contributor Author

cc @aduh95