Skip to content

Commit 97470b1

Browse files
targosrichardlau
authored andcommitted
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 <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]>
1 parent bff7e3c commit 97470b1

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
@@ -1970,6 +1970,12 @@
19701970
]
19711971
}],
19721972
],
1973+
# -Wno-invalid-offsetof flag is not valid for C.
1974+
# The flag is initially set in `toolchain.gypi` for all targets.
1975+
'cflags!': [ '-Wno-invalid-offsetof' ],
1976+
'xcode_settings': {
1977+
'WARNING_CFLAGS!': ['-Wno-invalid-offsetof']
1978+
},
19731979
'direct_dependent_settings': {
19741980
'include_dirs': [
19751981
'<(V8_ROOT)/third_party/zlib',

0 commit comments

Comments
 (0)