Skip to content

Commit e88a301

Browse files
committed
tools: do not pass invalid flag to C compiler
`-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>
1 parent ec60639 commit e88a301

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tools/v8_gypfiles/v8.gyp

+6
Original file line numberDiff line numberDiff line change
@@ -1989,6 +1989,12 @@
19891989
]
19901990
}],
19911991
],
1992+
# -Wno-invalid-offsetof flag is not valid for C.
1993+
# The flag is initially set in `toolchain.gypi` for all targets.
1994+
'cflags!': [ '-Wno-invalid-offsetof' ],
1995+
'xcode_settings': {
1996+
'WARNING_CFLAGS!': ['-Wno-invalid-offsetof']
1997+
},
19921998
'direct_dependent_settings': {
19931999
'include_dirs': [
19942000
'<(V8_ROOT)/third_party/zlib',

0 commit comments

Comments
 (0)