Skip to content

Commit 5d9447e

Browse files
committed
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: nodejs/build#4099 Signed-off-by: Jamie Magee <jamie.magee@gmail.com>
1 parent 0c59d78 commit 5d9447e

2 files changed

Lines changed: 11 additions & 1 deletion

File tree

configure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
valid_mips_float_abi = ('soft', 'hard')
5656
valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
5757
icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))
58-
maglev_enabled_architectures = ('x64', 'arm', 'arm64', 'ppc64', 's390x')
58+
maglev_enabled_architectures = ('x64', 'arm', 'arm64', 'ppc64', 's390x', 'riscv64')
5959

6060
# builtins may be removed later if they have been disabled by options
6161
shareable_builtins = {'undici/undici': 'deps/undici/undici.js',

tools/v8_gypfiles/v8.gyp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -671,6 +671,11 @@
671671
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_maglev.*?v8_current_cpu == \\"ppc64\\".*?sources \\+= ")',
672672
],
673673
}],
674+
['v8_target_arch=="riscv64"', {
675+
'sources': [
676+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_maglev.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
677+
],
678+
}],
674679
],
675680
}],
676681
['v8_enable_webassembly==1', {
@@ -1137,6 +1142,11 @@
11371142
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_maglev.*?v8_current_cpu == \\"ppc64\\".*?sources \\+= ")',
11381143
],
11391144
}],
1145+
['v8_target_arch=="riscv64"', {
1146+
'sources': [
1147+
'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "\\"v8_base_without_compiler.*?v8_enable_maglev.*?v8_current_cpu == \\"riscv64\\".*?sources \\+= ")',
1148+
],
1149+
}],
11401150
],
11411151
}],
11421152
['v8_enable_webassembly==1', {

0 commit comments

Comments
 (0)