Suppress MSVC warnings about invalid switch values
Dawn extends texture and buffer usage enums with additional internal usages. Bug: dawn:397 Change-Id: Idb3918e1455f596b1e21f109016dd622d8b66732 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/20781 Reviewed-by: Corentin Wallez <cwallez@chromium.org> Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
parent
a121e7fff0
commit
129dc00c69
|
@ -86,10 +86,11 @@ config("dawn_internal") {
|
||||||
# Only internal Dawn targets can use this config, this means only targets in
|
# Only internal Dawn targets can use this config, this means only targets in
|
||||||
# this BUILD.gn file.
|
# this BUILD.gn file.
|
||||||
visibility = [ ":*" ]
|
visibility = [ ":*" ]
|
||||||
|
cflags = []
|
||||||
|
|
||||||
# Enable more warnings that were found when using Dawn in other projects
|
# Enable more warnings that were found when using Dawn in other projects
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags = [
|
cflags += [
|
||||||
"-Wconditional-uninitialized",
|
"-Wconditional-uninitialized",
|
||||||
"-Wcstring-format-directive",
|
"-Wcstring-format-directive",
|
||||||
"-Wc++11-narrowing",
|
"-Wc++11-narrowing",
|
||||||
|
@ -123,6 +124,12 @@ config("dawn_internal") {
|
||||||
"-Wno-microsoft-enum-value",
|
"-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" ]
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
Loading…
Reference in New Issue