Index: third_party/libphonenumber/BUILD.gn |
diff --git a/third_party/libphonenumber/BUILD.gn b/third_party/libphonenumber/BUILD.gn |
index 22d13475be5fc88f86d5a4ddf3901e55834c4771..2f04ff53735d758a6775553294a02a384380a09a 100644 |
--- a/third_party/libphonenumber/BUILD.gn |
+++ b/third_party/libphonenumber/BUILD.gn |
@@ -92,6 +92,16 @@ test("libphonenumber_unittests") { |
include_dirs = [ "src/test" ] |
+ # gn orders flags on a target before flags from configs. The default config |
+ # adds -Wall, and these flags have to be after -Wall -- so they need to come |
+ # from a config and can't be on the target directly. |
+ config("libphonenumber_unittests_warnings") { |
+ if (is_clang) { |
+ cflags = [ "-Wno-unused-local-typedef" ] |
+ } |
+ } |
+ configs += [ ":libphonenumber_unittests_warnings" ] |
+ |
deps = [ |
":libphonenumber_without_metadata", |
"//base", |