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 || is_android || is_nacl) { | 7 if (is_linux || is_android || is_nacl) { |
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" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 "/wd4101", # Unreferenced local variable. | 160 "/wd4101", # Unreferenced local variable. |
161 ] | 161 ] |
162 } else if (is_mac || is_ios || is_android) { | 162 } else if (is_mac || is_ios || is_android) { |
163 # http://www.xmlsoft.org/threads.html says that this is required when using | 163 # http://www.xmlsoft.org/threads.html says that this is required when using |
164 # libxml from several threads, which can possibly happen in chrome. On | 164 # libxml from several threads, which can possibly happen in chrome. On |
165 # linux, this is picked up by transitivity from pkg-config output from | 165 # linux, this is picked up by transitivity from pkg-config output from |
166 # build/linux/system.gyp. | 166 # build/linux/system.gyp. |
167 defines = [ "_REENTRANT" ] | 167 defines = [ "_REENTRANT" ] |
168 } | 168 } |
169 | 169 |
170 if (is_clang) { | |
171 cflags = [ | |
172 # libxml passes `const unsigned char*` through `const char*`. | |
173 "-Wno-pointer-sign", | |
174 | |
175 # pattern.c and uri.c both have an intentional `for (...);` / | |
176 # `while(...);` loop. I submitted a patch to move the `'` to its own | |
177 # line, but until that's landed suppress the warning: | |
178 "-Wno-empty-body", | |
179 | |
180 # debugXML.c compares array 'arg' to NULL. | |
181 "-Wno-tautological-pointer-compare", | |
182 | |
183 # threads.c attempts to forward declare a pthread_equal which doesn't | |
184 # match the prototype in pthreads.h | |
185 "-Wno-ignored-attributes", | |
186 ] | |
187 } | |
188 config("libxml_warnings") { | 170 config("libxml_warnings") { |
189 if (is_clang) { | 171 if (is_clang) { |
190 cflags += [ | 172 cflags = [ |
| 173 # libxml passes `const unsigned char*` through `const char*`. |
| 174 "-Wno-pointer-sign", |
| 175 |
| 176 # pattern.c and uri.c both have an intentional `for (...);` / |
| 177 # `while(...);` loop. I submitted a patch to move the `'` to its own |
| 178 # line, but until that's landed suppress the warning: |
| 179 "-Wno-empty-body", |
| 180 |
| 181 # debugXML.c compares array 'arg' to NULL. |
| 182 "-Wno-tautological-pointer-compare", |
| 183 |
| 184 # threads.c attempts to forward declare a pthread_equal which doesn't |
| 185 # match the prototype in pthreads.h |
| 186 "-Wno-ignored-attributes", |
| 187 |
191 # libxml casts from int to long to void*. | 188 # libxml casts from int to long to void*. |
192 "-Wno-int-to-void-pointer-cast", | 189 "-Wno-int-to-void-pointer-cast", |
193 | 190 |
194 # libxml passes a volatile LPCRITICAL_SECTION* to a function expecting | 191 # libxml passes a volatile LPCRITICAL_SECTION* to a function expecting |
195 # a void* volatile*. | 192 # a void* volatile*. |
196 "-Wno-incompatible-pointer-types", | 193 "-Wno-incompatible-pointer-types", |
| 194 |
| 195 # trio_is_special_quantity and trio_is_negative are only |
| 196 # used with certain preprocessor defines set. |
| 197 "-Wno-unused-function", |
197 ] | 198 ] |
198 } | 199 } |
199 } | 200 } |
200 configs += [ ":libxml_warnings" ] | 201 configs += [ ":libxml_warnings" ] |
201 | 202 |
202 include_dirs = [ "$os_include" ] | 203 include_dirs = [ "$os_include" ] |
203 } | 204 } |
OLD | NEW |