From cd61fce34e81eba32f3b7c3750c685bc8d029ca8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Sun, 24 Dec 2023 12:24:11 +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 PR-URL: https://github.com/nodejs/node/pull/51257 Reviewed-By: Richard Lau Reviewed-By: James M Snell Reviewed-By: Luigi Pinca Reviewed-By: Marco Ippolito --- 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' ],