[build] Extract C++-only warning flags in GN compiler configs
Several C++-only warning suppressions were incorrectly placed in the shared 'default_warning_flags' list instead of 'default_warning_flags_cc'. This caused these flags (such as -Wno-microsoft-unqualified-friend, -Wno-microsoft-cast) to be applied to pure C targets (like zlib and BoringSSL assembly). This CL moves these C++-only warnings to 'default_warning_flags_cc', ensuring they are only applied to C++ compilation units. This improves compile database accuracy, prevents IDE/clangd from surfacing phantom diagnostics on C files, and makes the build configuration explicit and robust. Change-Id: I117de03496164d7e2e39b5deab7754fd85452923 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/510181 Commit-Queue: Kevin Moore <kevmoo@google.com> Reviewed-by: Ryan Macnak <rmacnak@google.com> Auto-Submit: Kevin Moore <kevmoo@google.com>
This commit is contained in:
committed by
dart-scoped@luci-project-accounts.iam.gserviceaccount.com
parent
7d8b5becb4
commit
ab0f7d309c
@@ -639,11 +639,13 @@ if (is_win) {
|
||||
"-Wno-ignored-pragma-optimize", # icu, double-conversion
|
||||
"-Wno-macro-redefined",
|
||||
"-Wno-microsoft-cast",
|
||||
"-Wno-microsoft-unqualified-friend",
|
||||
"-Wno-unknown-argument", # icu
|
||||
"-Wno-unused-value", # crashpad
|
||||
"-Wno-deprecated-non-prototype", # zlib
|
||||
]
|
||||
default_warning_flags_cc += [
|
||||
"-Wno-microsoft-unqualified-friend",
|
||||
]
|
||||
} else {
|
||||
default_warning_flags += [
|
||||
# Permanent.
|
||||
|
||||
Reference in New Issue
Block a user