OLD | NEW |
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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 } | 60 } |
61 } | 61 } |
62 configs += [ ":sdch_warnings" ] | 62 configs += [ ":sdch_warnings" ] |
63 | 63 |
64 if (is_linux || is_android) { | 64 if (is_linux || is_android) { |
65 include_dirs = [ "linux" ] | 65 include_dirs = [ "linux" ] |
66 } else if (is_ios) { | 66 } else if (is_ios) { |
67 include_dirs = [ "ios" ] | 67 include_dirs = [ "ios" ] |
68 } else if (is_mac) { | 68 } else if (is_mac) { |
69 include_dirs = [ "mac" ] | 69 include_dirs = [ "mac" ] |
| 70 defines = [ "OPEN_VCDIFF_USE_AUTO_PTR" ] |
70 } else if (is_win) { | 71 } else if (is_win) { |
71 include_dirs = [ "win" ] | 72 include_dirs = [ "win" ] |
72 } | 73 } |
73 | 74 |
74 # open-vcdiff's logging.h introduces static initializers. This was | 75 # open-vcdiff's logging.h introduces static initializers. This was |
75 # reported upstream years ago ( | 76 # reported upstream years ago ( |
76 # https://github.com/google/open-vcdiff/issues/33 ). Since | 77 # https://github.com/google/open-vcdiff/issues/33 ). Since |
77 # upstream won't fix this, work around it on the chromium side: | 78 # upstream won't fix this, work around it on the chromium side: |
78 # Inject a header that forwards to base/logging.h instead (which doesn't | 79 # Inject a header that forwards to base/logging.h instead (which doesn't |
79 # introduce static initializers, and which prevents open-vcdiff's | 80 # introduce static initializers, and which prevents open-vcdiff's |
80 # logging.h from being used). | 81 # logging.h from being used). |
81 if (is_win) { | 82 if (is_win) { |
82 cflags = [ | 83 cflags = [ |
83 "/FI", | 84 "/FI", |
84 "sdch/logging_forward.h", | 85 "sdch/logging_forward.h", |
85 ] | 86 ] |
86 } else { | 87 } else { |
87 logging_file = rebase_path("logging_forward.h", root_build_dir) | 88 logging_file = rebase_path("logging_forward.h", root_build_dir) |
88 cflags = [ | 89 cflags = [ |
89 "-include", | 90 "-include", |
90 logging_file, | 91 logging_file, |
91 ] | 92 ] |
92 } | 93 } |
93 } | 94 } |
OLD | NEW |