Skip to content

Commit

Permalink
tools: do not pass invalid flag to C compiler
Browse files Browse the repository at this point in the history
`-Wno-invalid-offsetof` is only valid for C++ and GCC warns about its
usage for C.

PR-URL: #51409
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Tobias Nießen <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
  • Loading branch information
targos committed Feb 15, 2024
1 parent ec60639 commit e88a301
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,12 @@
]
}],
],
# -Wno-invalid-offsetof flag is not valid for C.
# The flag is initially set in `toolchain.gypi` for all targets.
'cflags!': [ '-Wno-invalid-offsetof' ],
'xcode_settings': {
'WARNING_CFLAGS!': ['-Wno-invalid-offsetof']
},
'direct_dependent_settings': {
'include_dirs': [
'<(V8_ROOT)/third_party/zlib',
Expand Down

0 comments on commit e88a301

Please sign in to comment.