Pull -Wimplicit-fallthrough into separate config
This config will be added to Crashpad's BUILDCONFIG.gn defaults rather
than forced into all common configs.
Bug: crashpad:309
Change-Id: If4e2c0256b4f5c93604d57b14caf28880d40f646
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/mini_chromium/+/1773504
Reviewed-by: Joshua Peraza <jperaza@chromium.org>
diff --git a/build/BUILD.gn b/build/BUILD.gn
index 1c5fb09..ca3bba3 100644
--- a/build/BUILD.gn
+++ b/build/BUILD.gn
@@ -245,10 +245,6 @@
]
}
- if (mini_chromium_is_clang) {
- cflags += [ "-Wimplicit-fallthrough" ]
- }
-
cflags += common_flags
asmflags += common_flags
ldflags += common_flags
@@ -272,6 +268,13 @@
}
}
+config("Wimplicit_fallthrough") {
+ if (mini_chromium_is_clang) {
+ cflags = [ "-Wimplicit-fallthrough" ]
+ }
+
+}
+
config("win_console") {
if (mini_chromium_is_win) {
ldflags = [ "/SUBSYSTEM:CONSOLE" ]