From 9b0d2570b033a805b0e84c7ffb2ff8b07cf3d35b Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Sun, 5 Apr 2026 15:01:33 -0700 Subject: [PATCH] build: enable Maglev for riscv64 V8's Maglev compiler has supported riscv64 since V8 14.0 (with full source files in deps/v8/src/maglev/riscv/), but Node.js never wired it up: - configure.py excluded riscv64 from maglev_enabled_architectures - tools/v8_gypfiles/v8.gyp lacked GN-scraper conditions for riscv64 Maglev sources in both the v8_internal_headers and v8_base_without_compiler blocks This adds riscv64 to both, following the same pattern used for s390x in #60863 and matching V8's own BUILD.gn which already lists riscv64 alongside arm, arm64, x64, s390x, and ppc64 as Maglev-enabled architectures. Refs: https://github.com/nodejs/build/issues/4099 Signed-off-by: Jamie Magee --- configure.py | 2 +- tools/v8_gypfiles/v8.gyp | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/configure.py b/configure.py index 9ec5b2fc4694c6..7d72d13830450a 100755 --- a/configure.py +++ b/configure.py @@ -55,7 +55,7 @@ valid_mips_float_abi = ('soft', 'hard') valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu') icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8')) -maglev_enabled_architectures = ('x64', 'arm', 'arm64', 's390x') +maglev_enabled_architectures = ('x64', 'arm', 'arm64', 's390x', 'riscv64') # builtins may be removed later if they have been disabled by options shareable_builtins = {'undici/undici': 'deps/undici/undici.js', diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index e09fcc1ce8c59f..2e6d7cd4355856 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -716,6 +716,11 @@ '