From a4569752911d98f8f286539ef84f3768cb0e8221 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Fri, 22 Dec 2023 11:28:05 +0100 Subject: [PATCH] build: add `-flax-vector-conversions` to V8 build The flag is on by default in Clang and V8 recently made a change that makes it necessary with GCC. Refs: https://github.com/v8/v8/commit/7fbbf93ea879863c1b92ef1a829190b3a31e544c Refs: https://github.com/llvm/llvm-project/blob/54067c5fbe9fc13ab195cdddb8f17e18d72b5fe4/clang/include/clang/Basic/LangOptions.def#L133-L134 Refs: https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html#index-flax-vector-conversions --- tools/v8_gypfiles/toolchain.gypi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/v8_gypfiles/toolchain.gypi b/tools/v8_gypfiles/toolchain.gypi index b311c04d29281f..cc97adfbc30974 100644 --- a/tools/v8_gypfiles/toolchain.gypi +++ b/tools/v8_gypfiles/toolchain.gypi @@ -138,7 +138,11 @@ 'cflags': [ '-Werror', '-Wno-unknown-pragmas' ], },{ 'cflags!': [ '-Wall', '-Wextra' ], - 'cflags': [ '-Wno-return-type' ], + 'cflags': [ + '-Wno-return-type', + # On by default in Clang and V8 requires it at least for arm64. + '-flax-vector-conversions', + ], }], ['clang or OS!="win"', { 'cflags': [ '-Wno-invalid-offsetof' ],