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': [ '