From c7f8b1629123065c20362ca5c2be0552405fbc4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Zasso?= Date: Tue, 9 Jan 2024 10:50:57 +0100 Subject: [PATCH] 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. --- tools/v8_gypfiles/v8.gyp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/v8_gypfiles/v8.gyp b/tools/v8_gypfiles/v8.gyp index 4d69a59fcbc5b5..bc6aaf40fe585b 100644 --- a/tools/v8_gypfiles/v8.gyp +++ b/tools/v8_gypfiles/v8.gyp @@ -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',