Index: build/secondary/testing/gtest/BUILD.gn |
diff --git a/build/secondary/testing/gtest/BUILD.gn b/build/secondary/testing/gtest/BUILD.gn |
index a20a09d4db6470ea5534096c1822e27a24fb3478..073faec56294fc03856b17d59c4b8745b69ded4a 100644 |
--- a/build/secondary/testing/gtest/BUILD.gn |
+++ b/build/secondary/testing/gtest/BUILD.gn |
@@ -111,6 +111,16 @@ static_library("gtest") { |
configs -= [ "//build/config/compiler:chromium_code" ] |
configs += [ "//build/config/compiler:no_chromium_code" ] |
+ |
+ config("gtest_warnings") { |
+ if (is_win && is_clang) { |
+ # The Mutex constructor initializer list in gtest-port.cc is incorrectly |
+ # ordered. See |
+ # https://groups.google.com/d/msg/googletestframework/S5uSV8L2TX8/U1FaTDa6J6sJ. |
+ cflags = [ "-Wno-reorder" ] |
+ } |
+ } |
+ configs += [ ":gtest_warnings" ] |
} |
source_set("gtest_main") { |