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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « components/pairing/fake_host_pairing_controller.cc ('k') | sdch/sdch.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 config("sdch_config") { 5 config("sdch_config") {
6 include_dirs = [ "open-vcdiff/src" ] 6 include_dirs = [ "open-vcdiff/src" ]
7 } 7 }
8 8
9 static_library("sdch") { 9 static_library("sdch") {
10 sources = [ 10 sources = [
(...skipping 27 matching lines...) Expand all
38 "open-vcdiff/vsprojects/stdint.h", 38 "open-vcdiff/vsprojects/stdint.h",
39 ] 39 ]
40 40
41 public_configs = [ ":sdch_config" ] 41 public_configs = [ ":sdch_config" ]
42 42
43 deps = [ 43 deps = [
44 "//base", 44 "//base",
45 "//third_party/zlib", 45 "//third_party/zlib",
46 ] 46 ]
47 47
48 # gn orders flags on a target before flags from configs. The default config
49 # adds -Wall, and these flags have to be after -Wall -- so they need to come
50 # from a config and can't be on the target directly.
51 config("sdch_warnings") {
52 cflags = []
53 if (is_linux) {
54 # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
55 cflags += [ "-Wno-deprecated-declarations" ]
56 }
57
58 if (is_clang) {
59 # sdch uses the pre-c++11 typedef-as-static_assert hack.
60 # https://code.google.com/p/open-vcdiff/issues/detail?id=44
61 cflags += [ "-Wno-unused-local-typedef" ]
62 }
63 }
64 configs += [ ":sdch_warnings" ]
65
48 if (is_linux || is_android) { 66 if (is_linux || is_android) {
49 include_dirs = [ "linux" ] 67 include_dirs = [ "linux" ]
50 } else if (is_ios) { 68 } else if (is_ios) {
51 include_dirs = [ "ios" ] 69 include_dirs = [ "ios" ]
52 } else if (is_mac) { 70 } else if (is_mac) {
53 include_dirs = [ "mac" ] 71 include_dirs = [ "mac" ]
54 } else if (is_win) { 72 } else if (is_win) {
55 include_dirs = [ "win" ] 73 include_dirs = [ "win" ]
56 } 74 }
57 75
58 # open-vcdiff's logging.h introduces static initializers. This was 76 # open-vcdiff's logging.h introduces static initializers. This was
59 # reported upstream years ago ( 77 # reported upstream years ago (
60 # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since 78 # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since
61 # upstream won't fix this, work around it on the chromium side: 79 # upstream won't fix this, work around it on the chromium side:
62 # Inject a header that forwards to base/logging.h instead (which doesn't 80 # Inject a header that forwards to base/logging.h instead (which doesn't
63 # introduce static initializers, and which prevents open-vcdiff's 81 # introduce static initializers, and which prevents open-vcdiff's
64 # logging.h from being used). 82 # logging.h from being used).
65 if (is_win) { 83 if (is_win) {
66 cflags = [ 84 cflags = [
67 "/FI", "sdch/logging_forward.h", 85 "/FI", "sdch/logging_forward.h",
68 ] 86 ]
69 } else { 87 } else {
70 logging_file = rebase_path("logging_forward.h", root_build_dir) 88 logging_file = rebase_path("logging_forward.h", root_build_dir)
71 cflags = [ "-include", logging_file ] 89 cflags = [ "-include", logging_file ]
72 if (is_linux) {
73 # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
74 cflags += [ "-Wno-deprecated-declarations" ]
75 }
76 } 90 }
77 } 91 }
OLDNEW
« 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