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: https://github.com/nodejs/node/pull/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>
This commit is contained in:
Michaël Zasso 2024-01-09 10:50:57 +01:00
parent 94f824a19d
commit b180512aef
No known key found for this signature in database
GPG Key ID: 770F7A9A5AE15600

View File

@ -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',