Force -Wno-shadow to avoid variable shadowing warnings.

Long term, ideally, these would be fixed and this flag can be removed.
For now, this is an expedient way to allow enabling -Wshadow in
Chromium.

Bug: chromium:794619
Change-Id: Idd3b6eaf61cc6e2a32eecf94d6cc6a41afb5f4eb
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/64761
Auto-Submit: Peter Kasting <pkasting@google.com>
Commit-Queue: Kai Ninomiya <kainino@chromium.org>
Reviewed-by: Kai Ninomiya <kainino@chromium.org>
This commit is contained in:
Peter Kasting 2021-09-21 18:08:10 +00:00 committed by Dawn LUCI CQ
parent 7d174a1eff
commit a928047b89
1 changed files with 3 additions and 0 deletions

View File

@ -94,6 +94,9 @@ config("dawn_internal") {
visibility = [ "../*" ] visibility = [ "../*" ]
cflags = [] cflags = []
if (is_clang) {
cflags += [ "-Wno-shadow" ]
}
# Enable more warnings that were found when using Dawn in other projects. # Enable more warnings that were found when using Dawn in other projects.
# Add them only when building in standalone because we control which clang # Add them only when building in standalone because we control which clang