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

Side by Side Diff: third_party/libxml/libxml.gyp

Issue 437543007: Refactor how clang warning flags are set. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 4 months 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 | Annotate | Revision Log
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 { 5 {
6 'variables': { 6 'variables': {
7 'conditions': [ 7 'conditions': [
8 # Define an "os_include" variable that points at the OS-specific generated 8 # Define an "os_include" variable that points at the OS-specific generated
9 # headers. These were generated by running the configure script offline. 9 # headers. These were generated by running the configure script offline.
10 ['os_posix == 1 and OS != "mac" and OS != "ios"', { 10 ['os_posix == 1 and OS != "mac" and OS != "ios"', {
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 'win32/config.h', 181 'win32/config.h',
182 'win32/include/libxml/xmlversion.h', 182 'win32/include/libxml/xmlversion.h',
183 ], 183 ],
184 'defines': [ 184 'defines': [
185 # Define LIBXML_STATIC as nothing to match how libxml.h 185 # Define LIBXML_STATIC as nothing to match how libxml.h
186 # (an internal header) defines LIBXML_STATIC, otherwise 186 # (an internal header) defines LIBXML_STATIC, otherwise
187 # we get the macro redefined warning from GCC. (-DFOO 187 # we get the macro redefined warning from GCC. (-DFOO
188 # defines the macro FOO as 1.) 188 # defines the macro FOO as 1.)
189 'LIBXML_STATIC=', 189 'LIBXML_STATIC=',
190 ], 190 ],
191 'variables': {
192 'clang_warning_flags': [
193 # libxml passes `const unsigned char*` through `const char*`.
194 '-Wno-pointer-sign',
195 # pattern.c and uri.c both have an intentional
196 # `for (...);` / `while(...);` loop. I submitted a patch to
197 # move the `'` to its own line, but until that's landed
198 # suppress the warning:
199 '-Wno-empty-body',
200 # debugXML.c compares array 'arg' to NULL.
201 '-Wno-tautological-pointer-compare',
202 # See http://crbug.com/138571#c8
203 '-Wno-ignored-attributes',
204 ],
205 },
191 'include_dirs': [ 206 'include_dirs': [
192 '<(os_include)', 207 '<(os_include)',
193 '<(os_include)/include', 208 '<(os_include)/include',
194 'src/include', 209 'src/include',
195 ], 210 ],
196 'dependencies': [ 211 'dependencies': [
197 '../icu/icu.gyp:icuuc', 212 '../icu/icu.gyp:icuuc',
198 '../zlib/zlib.gyp:zlib', 213 '../zlib/zlib.gyp:zlib',
199 ], 214 ],
200 'export_dependent_settings': [ 215 'export_dependent_settings': [
(...skipping 26 matching lines...) Expand all
227 'product_name': 'libxml2', 242 'product_name': 'libxml2',
228 # Disable unimportant 'unused variable' warning, and 243 # Disable unimportant 'unused variable' warning, and
229 # signed/unsigned comparison warning. The signed/unsigned (4101) 244 # signed/unsigned comparison warning. The signed/unsigned (4101)
230 # is fixed upstream and can be removed eventually. 245 # is fixed upstream and can be removed eventually.
231 # TODO(jschuh): http://crbug.com/167187 size_t -> int 246 # TODO(jschuh): http://crbug.com/167187 size_t -> int
232 'msvs_disabled_warnings': [ 4018, 4101, 4267 ], 247 'msvs_disabled_warnings': [ 4018, 4101, 4267 ],
233 }, { # else: OS!="win" 248 }, { # else: OS!="win"
234 'product_name': 'xml2', 249 'product_name': 'xml2',
235 }], 250 }],
236 ['clang==1', { 251 ['clang==1', {
237 'xcode_settings': {
238 'WARNING_CFLAGS': [
239 # libxml passes `const unsigned char*` through `const char*`.
240 '-Wno-pointer-sign',
241 # pattern.c and uri.c both have an intentional
242 # `for (...);` / `while(...);` loop. I submitted a patch to
243 # move the `'` to its own line, but until that's landed
244 # suppress the warning:
245 '-Wno-empty-body',
246 # debugXML.c compares array 'arg' to NULL.
247 '-Wno-tautological-pointer-compare',
248 ],
249 },
250 'cflags': [
251 '-Wno-pointer-sign',
252 '-Wno-empty-body',
253 '-Wno-tautological-pointer-compare',
254
255 # See http://crbug.com/138571#c8
256 '-Wno-ignored-attributes',
257 ],
258 'msvs_settings': { 252 'msvs_settings': {
259 'VCCLCompilerTool': { 253 'VCCLCompilerTool': {
260 'AdditionalOptions': [ 254 'AdditionalOptions': [
261 # VS2012's standard lib doesn't provide nan(). 255 # VS2012's standard lib doesn't provide nan().
262 '/U__STDC_VERSION__', 256 '/U__STDC_VERSION__',
263 ], 257 ],
264 }, 258 },
265 }, 259 },
266 }], 260 }],
267 ], 261 ],
268 }], 262 }],
269 ], 263 ],
270 }, 264 },
271 ], 265 ],
272 } 266 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698