OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 # Define an "os_include" variable that points at the OS-specific generated | 5 # Define an "os_include" variable that points at the OS-specific generated |
6 # headers. These were generated by running the configure script offline. | 6 # headers. These were generated by running the configure script offline. |
7 if (is_linux) { | 7 if (is_linux || is_android) { |
8 os_include = "linux" | 8 os_include = "linux" |
9 } else if (is_mac || is_ios) { | 9 } else if (is_mac || is_ios) { |
10 os_include = "mac" | 10 os_include = "mac" |
11 } else if (is_win) { | 11 } else if (is_win) { |
12 os_include = "win32" | 12 os_include = "win32" |
13 } | 13 } |
14 | 14 |
15 config("libxml_config") { | 15 config("libxml_config") { |
16 # Define LIBXML_STATIC as nothing to match how libxml.h (an internal header) | 16 # Define LIBXML_STATIC as nothing to match how libxml.h (an internal header) |
17 # defines LIBXML_STATIC, otherwise we get the macro redefined warning from | 17 # defines LIBXML_STATIC, otherwise we get the macro redefined warning from |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 148 |
149 deps = [ | 149 deps = [ |
150 "//third_party/icu:icuuc", | 150 "//third_party/icu:icuuc", |
151 "//third_party/zlib", | 151 "//third_party/zlib", |
152 ] | 152 ] |
153 | 153 |
154 if (is_win) { | 154 if (is_win) { |
155 cflags_c = [ | 155 cflags_c = [ |
156 "/wd4101", # Unreferenced local variable. | 156 "/wd4101", # Unreferenced local variable. |
157 ] | 157 ] |
158 } else if (is_linux) { | |
159 # We need dl for dlopen() and friends. | |
160 libs = [ "dl" ] | |
161 } else if (is_mac || is_android) { | 158 } else if (is_mac || is_android) { |
162 # http://www.xmlsoft.org/threads.html says that this is required when using | 159 # http://www.xmlsoft.org/threads.html says that this is required when using |
163 # libxml from several threads, which can possibly happen in chrome. On | 160 # libxml from several threads, which can possibly happen in chrome. On |
164 # linux, this is picked up by transitivity from pkg-config output from | 161 # linux, this is picked up by transitivity from pkg-config output from |
165 # build/linux/system.gyp. | 162 # build/linux/system.gyp. |
166 defines = [ "_REENTRANT" ] | 163 defines = [ "_REENTRANT" ] |
167 } | 164 } |
168 | 165 |
169 if (is_clang) { | 166 if (is_clang) { |
170 cflags = [ | 167 cflags = [ |
171 # libxml passes `const unsigned char*` through `const char*`. | 168 # libxml passes `const unsigned char*` through `const char*`. |
172 "-Wno-pointer-sign", | 169 "-Wno-pointer-sign", |
173 | 170 |
174 # pattern.c and uri.c both have an intentional `for (...);` / | 171 # pattern.c and uri.c both have an intentional `for (...);` / |
175 # `while(...);` loop. I submitted a patch to move the `'` to its own | 172 # `while(...);` loop. I submitted a patch to move the `'` to its own |
176 # line, but until that's landed suppress the warning: | 173 # line, but until that's landed suppress the warning: |
177 "-Wno-empty-body", | 174 "-Wno-empty-body", |
178 | 175 |
179 # See http://crbug.com/138571#c8 | 176 # See http://crbug.com/138571#c8 |
180 "-Wno-ignored-attributes", | 177 "-Wno-ignored-attributes", |
181 ] | 178 ] |
182 } | 179 } |
183 | 180 |
184 include_dirs = [ | 181 include_dirs = [ |
185 "$os_include", | 182 "$os_include", |
186 ] | 183 ] |
187 } | 184 } |
OLD | NEW |