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 <technicalcute@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
  • Loading branch information
targos committed Jan 15, 2024
1 parent 94f824a commit b180512
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 b180512

Please sign in to comment.