| Index: build/secondary/testing/gtest/BUILD.gn
|
| diff --git a/build/secondary/testing/gtest/BUILD.gn b/build/secondary/testing/gtest/BUILD.gn
|
| index a9f5007b2670a8619048c58e451396c26cc8f69f..8e5cdcccede667ffd151cfb0d652dc1cd00bcc7a 100644
|
| --- a/build/secondary/testing/gtest/BUILD.gn
|
| +++ b/build/secondary/testing/gtest/BUILD.gn
|
| @@ -58,6 +58,15 @@ config("gtest_direct_config") {
|
| defines = [ "UNIT_TEST" ]
|
| }
|
|
|
| +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" ]
|
| + }
|
| +}
|
| +
|
| static_library("gtest") {
|
| # TODO http://crbug.com/412064 enable this flag all the time.
|
| testonly = !is_component_build
|
| @@ -121,17 +130,12 @@ static_library("gtest") {
|
| public_configs = [ ":gtest_direct_config" ]
|
|
|
| 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" ]
|
| + configs += [
|
| + "//build/config/compiler:no_chromium_code",
|
| +
|
| + # Must be after no_chromium_code for warning flags to be ordered correctly.
|
| + ":gtest_warnings",
|
| + ]
|
| }
|
|
|
| source_set("gtest_main") {
|
|
|