From 06c1fbc25bab83490b066d64f2fdf801a9727481 Mon Sep 17 00:00:00 2001 From: Jamie Magee Date: Wed, 1 Jul 2026 08:43:10 -0500 Subject: [PATCH] build: enable Maglev for riscv64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 PR-URL: https://github.com/nodejs/node/pull/62605 Reviewed-By: René Reviewed-By: Stewart X Addison Reviewed-By: Richard Lau --- 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 c625ddd8789..73a755f67e7 100755 --- a/configure.py +++ b/configure.py @@ -55,7 +55,7 @@ valid_mips_fpu = ('fp32', 'fp64', 'fpxx') 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', 'ppc64', 's390x') +maglev_enabled_architectures = ('x64', 'arm', 'arm64', 'ppc64', '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 38732b4b34c..193b8aebdd2 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -671,6 +671,11 @@ '