Fixes for build in Chromium - Fix missing include in span.h which breaks on libc++ modules builds. - Fix missing suppressions for -Wsign-compare which is enabled by -Wextra in the default `chromium_code` config. - Remove gtest from --system-header-prefix in Dawn standalone because it's no longer needed. Roll failure here: https://crrev.com/c/8091350 Bug: none, 523358231 Change-Id: I727819e7997c915284d820deb248c1d55db1eddb Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/324796 Reviewed-by: Shrek Shao <shrekshao@google.com> Auto-Submit: Kai Ninomiya <kainino@chromium.org> Reviewed-by: Antonio Maiorano <amaiorano@google.com>
diff --git a/src/utils/BUILD.gn b/src/utils/BUILD.gn index fd6be6f..1b6860e 100644 --- a/src/utils/BUILD.gn +++ b/src/utils/BUILD.gn
@@ -149,7 +149,6 @@ "benchmark/", "glslang/", "gmock/", - "gtest/", "KHR/", "partition_alloc/", "napi.h",
diff --git a/src/utils/span.h b/src/utils/span.h index 3dcb1bd..55de9df 100644 --- a/src/utils/span.h +++ b/src/utils/span.h
@@ -31,6 +31,7 @@ #include <algorithm> #include <concepts> #include <cstdint> +#include <functional> #include <limits> #include <memory> #include <new>
diff --git a/src/utils/warning_suppression_mappings.txt b/src/utils/warning_suppression_mappings.txt index 335b096..39e6a63 100644 --- a/src/utils/warning_suppression_mappings.txt +++ b/src/utils/warning_suppression_mappings.txt
@@ -1,3 +1,7 @@ +# Per-file per-warning suppressions. +# Every suppression should have a brief explanation of why it's needed. +# Note: make sure there is only one section per warning - later sections overwrite earlier ones. + [language-extension-token] # For MSVC-specific extensions: __FUNCSIG__, __uuidof, IID_PPV_ARGS. src:*src/dawn/native/Surface.cpp @@ -46,3 +50,11 @@ [double-promotion] # Performance warning for float-to-double promotion, common in tests. src:*src/dawn/tests/* +# Also happens inside GTest macros like EXPECT_EQ. +# Path differs currently in Dawn vs Chromium. +src:*third_party/googletest/{,src/}googletest/include/gtest/gtest.h + +[sign-compare] +# Happens inside EXPECT_EQ macros and similar in our tests. Should be fixed, but not critical. +# Path differs currently in Dawn vs Chromium. +src:*third_party/googletest/{,src/}googletest/include/gtest/gtest.h