diff --git a/src/common/BUILD.gn b/src/common/BUILD.gn index da0c371c4b..81e2d6fd77 100644 --- a/src/common/BUILD.gn +++ b/src/common/BUILD.gn @@ -86,10 +86,11 @@ config("dawn_internal") { # Only internal Dawn targets can use this config, this means only targets in # this BUILD.gn file. visibility = [ ":*" ] + cflags = [] # Enable more warnings that were found when using Dawn in other projects if (is_clang) { - cflags = [ + cflags += [ "-Wconditional-uninitialized", "-Wcstring-format-directive", "-Wc++11-narrowing", @@ -123,6 +124,12 @@ config("dawn_internal") { "-Wno-microsoft-enum-value", ] } + + if (!is_clang && is_win) { + # Dawn extends wgpu enums with internal enums. + # MSVC considers these invalid switch values. crbug.com/dawn/397. + cflags += [ "/wd4063" ] + } } ###############################################################################