Skip to content

Commit

Permalink
build: add -flax-vector-conversions to V8 build
Browse files Browse the repository at this point in the history
The flag is on by default in Clang and V8 recently made a change that
makes it necessary with GCC.

Refs: v8/v8@7fbbf93
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: #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>
  • Loading branch information
targos authored and RafaelGSS committed Jan 2, 2024
1 parent 917d887 commit cd61fce
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -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' ],
Expand Down

0 comments on commit cd61fce

Please sign in to comment.