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: 7fbbf93ea8
Refs: 54067c5fbe/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 <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
This commit is contained in:
Michaël Zasso 2023-12-24 12:24:11 +01:00 committed by GitHub
parent 894f1d5ebf
commit ee61c2c6d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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' ],