diff options
author | thakis <thakis@chromium.org> | 2014-11-12 12:53:32 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-11-12 20:54:04 +0000 |
commit | 4970b5813302934cfc3df8ccd0b8647a912884a1 (patch) | |
tree | e37dff9f10da0c819d6a9cba7bf599c62d194656 /sdch | |
parent | 3a2200e8fcdc83989c6ee200fbdce5958ccd9011 (diff) | |
download | chromium_src-4970b5813302934cfc3df8ccd0b8647a912884a1.zip chromium_src-4970b5813302934cfc3df8ccd0b8647a912884a1.tar.gz chromium_src-4970b5813302934cfc3df8ccd0b8647a912884a1.tar.bz2 |
Enable -Wunused-local-typedef
BUG=321833
TBR=brettw
Review URL: https://codereview.chromium.org/722513003
Cr-Commit-Position: refs/heads/master@{#303892}
Diffstat (limited to 'sdch')
-rw-r--r-- | sdch/BUILD.gn | 22 | ||||
-rw-r--r-- | sdch/sdch.gyp | 5 |
2 files changed, 23 insertions, 4 deletions
diff --git a/sdch/BUILD.gn b/sdch/BUILD.gn index 7a95f1f..727fb49 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" ] - } } } diff --git a/sdch/sdch.gyp b/sdch/sdch.gyp index 52a92f3..e886288 100644 --- a/sdch/sdch.gyp +++ b/sdch/sdch.gyp @@ -71,6 +71,11 @@ # introduce static initializers, and which prevents open-vcdiff's # logging.h from being used). 'variables': { + 'clang_warning_flags': [ + # sdch uses the pre-c++11 typedef-as-static_assert hack. + # https://code.google.com/p/open-vcdiff/issues/detail?id=44 + '-Wno-unused-local-typedef', + ], 'logging_path': 'logging_forward.h', 'conditions': [ # gyp leaves unspecified what the cwd is when running the compiler, |