Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(122)

Unified Diff: sdch/BUILD.gn

Issue 722513003: Enable -Wunused-local-typedef (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « components/pairing/fake_host_pairing_controller.cc ('k') | sdch/sdch.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdch/BUILD.gn
diff --git a/sdch/BUILD.gn b/sdch/BUILD.gn
index 7a95f1fa1547c80f49fc416ef7b5b672b34cd7b1..727fb497712a3dfad9efbed989158701c1978a11 100644
--- a/sdch/BUILD.gn
+++ b/sdch/BUILD.gn
@@ -45,6 +45,24 @@ static_library("sdch") {
"//third_party/zlib",
]
+ # 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("sdch_warnings") {
+ cflags = []
+ if (is_linux) {
+ # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
+ cflags += [ "-Wno-deprecated-declarations" ]
+ }
+
+ if (is_clang) {
+ # sdch uses the pre-c++11 typedef-as-static_assert hack.
+ # https://code.google.com/p/open-vcdiff/issues/detail?id=44
+ cflags += [ "-Wno-unused-local-typedef" ]
+ }
+ }
+ configs += [ ":sdch_warnings" ]
+
if (is_linux || is_android) {
include_dirs = [ "linux" ]
} else if (is_ios) {
@@ -69,9 +87,5 @@ static_library("sdch") {
} else {
logging_file = rebase_path("logging_forward.h", root_build_dir)
cflags = [ "-include", logging_file ]
- if (is_linux) {
- # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
- cflags += [ "-Wno-deprecated-declarations" ]
- }
}
}
« no previous file with comments | « components/pairing/fake_host_pairing_controller.cc ('k') | sdch/sdch.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698