From 4ea299a4a5aa0b7882d54e774941d72418622261 Mon Sep 17 00:00:00 2001 From: Afonso Oliveira Date: Fri, 13 Nov 2026 10:49:19 +0000 Subject: [PATCH] build: use Highway EMU128 on riscv64 rv64gc has no SIMD baseline. With GCC before 16, Highway then falls back to HWY_SCALAR, where V8's json-stringifier.cc does not compile. Select EMU128 on riscv64, as is already done for armv7. Node.js builds and runs its test suite on riscv64 with this change. Assisted-by: Claude Signed-off-by: Afonso Oliveira --- tools/v8_gypfiles/highway.gyp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/v8_gypfiles/highway.gyp b/tools/v8_gypfiles/highway.gyp index c7f915b76e2f..469640bf3848 100644 --- a/tools/v8_gypfiles/highway.gyp +++ b/tools/v8_gypfiles/highway.gyp @@ -31,6 +31,12 @@ ['v8_target_arch=="arm" and arm_version==7', { 'defines': ['HWY_BROKEN_EMU128=0',], }], + # rv64gc has no SIMD baseline. With GCC before 16 Highway would fall back to + # HWY_SCALAR, where hw::FixedTag in V8's json-stringifier.cc does + # not compile, so use EMU128 as above. + ['v8_target_arch=="riscv64"', { + 'defines': ['HWY_BROKEN_EMU128=0',], + }], ], }, 'include_dirs': [