From c8fbac45246c40a2785be1e3b7e2430ceafda091 Mon Sep 17 00:00:00 2001 From: Stewart X Addison Date: Tue, 1 Sep 2026 16:30:26 +0100 Subject: [PATCH] build: activate correct default flags for riscv64 Signed-off-by: Stewart X Addison --- common.gypi | 8 ++++++++ tools/v8_gypfiles/v8.gyp | 3 +++ 2 files changed, 11 insertions(+) diff --git a/common.gypi b/common.gypi index a83523286a91..1729bfd3cb00 100644 --- a/common.gypi +++ b/common.gypi @@ -611,6 +611,10 @@ 'cflags': [ '-m64', '-march=z14' ], 'ldflags': [ '-m64', '-march=z14' ], }], + [ 'host_arch=="riscv64" and OS=="linux"', { + 'cflags': [ '-march=rv64gc' ], + 'ldflags': [ '-march=rv64gc' ], + }], ], }], ['_toolset=="target"', { @@ -636,6 +640,10 @@ 'cflags': [ '-m64', '-march=z14' ], 'ldflags': [ '-m64', '-march=z14' ], }], + [ 'target_arch=="riscv64" and OS=="linux"', { + 'cflags': [ '-march=rv64gc' ], + 'ldflags': [ '-march=rv64gc' ], + }], ], }], ], diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 32fc99e2af9f..7c7ebc8af42a 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -2485,6 +2485,9 @@ ['v8_target_arch=="ppc64" or v8_target_arch=="s390x"', { 'defines': ['TOOLCHAIN_MISS_ASM_HWCAP_H',], }], + ['v8_target_arch=="riscv64"', { + 'defines': ['HWY_BROKEN_TARGETS=HWY_RVV',], + }], ], 'sources': [ '