Refactor how clang warning flags are set.
Previously, every gyp file that wanted to set clang warnings had to check for clang==1 and then set cflags and xcode_settings.WARNING_CFLAGS. Factor this out, so that targets only need to set clang_warning_flags for warnings that apply to all platforms. (Per-platform flags still need to be set manually.) This removes existing duplication from gyp files, and prevents adding more duplication when trying to add the same warning flags for clang/win. BUG=82385 R=hans@chromium.org, scottmg@chromium.org TBR=various owners Review URL: https://codereview.chromium.org/437543007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287092 0039d316-1c4b-4281-b951-d872f2087c98
This commit is contained in:
breakpad
build
skia
third_party
@@ -580,6 +580,12 @@
|
|||||||
'breakpad_processor_support',
|
'breakpad_processor_support',
|
||||||
'linux_dumper_unittest_helper',
|
'linux_dumper_unittest_helper',
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# See http://crbug.com/138571#c18
|
||||||
|
'-Wno-unused-value',
|
||||||
|
],
|
||||||
|
},
|
||||||
|
|
||||||
'sources': [
|
'sources': [
|
||||||
'linux/breakpad_googletest_includes.h',
|
'linux/breakpad_googletest_includes.h',
|
||||||
@@ -616,12 +622,6 @@
|
|||||||
'.',
|
'.',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
[ 'clang == 1', {
|
|
||||||
'cflags': [
|
|
||||||
# See http://crbug.com/138571#c18
|
|
||||||
'-Wno-unused-value',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
['OS=="android"', {
|
['OS=="android"', {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'-llog',
|
'-llog',
|
||||||
|
@@ -7,13 +7,10 @@
|
|||||||
['OS=="android"', {
|
['OS=="android"', {
|
||||||
'toolsets': ['host'],
|
'toolsets': ['host'],
|
||||||
}],
|
}],
|
||||||
['clang==1', {
|
|
||||||
'cflags': ['-Wno-tautological-constant-out-of-range-compare'],
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': ['-Wno-tautological-constant-out-of-range-compare'],
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': ['-Wno-tautological-constant-out-of-range-compare'],
|
||||||
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'src',
|
'src',
|
||||||
'src/third_party',
|
'src/third_party',
|
||||||
|
@@ -2400,7 +2400,40 @@
|
|||||||
'host_os%': '<(host_os)', # See comment above chromium_code.
|
'host_os%': '<(host_os)', # See comment above chromium_code.
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
'clang_warning_flags': [
|
||||||
|
'-Wheader-hygiene',
|
||||||
|
|
||||||
|
# Don't die on dtoa code that uses a char as an array index.
|
||||||
|
# This is required solely for base/third_party/dmg_fp/dtoa.cc.
|
||||||
|
'-Wno-char-subscripts',
|
||||||
|
|
||||||
|
# TODO(thakis): This used to be implied by -Wno-unused-function,
|
||||||
|
# which we no longer use. Check if it makes sense to remove
|
||||||
|
# this as well. http://crbug.com/316352
|
||||||
|
'-Wno-unneeded-internal-declaration',
|
||||||
|
|
||||||
|
# Warns on switches on enums that cover all enum values but
|
||||||
|
# also contain a default: branch. Chrome is full of that.
|
||||||
|
'-Wno-covered-switch-default',
|
||||||
|
|
||||||
|
# Warns when a const char[] is converted to bool.
|
||||||
|
'-Wstring-conversion',
|
||||||
|
|
||||||
|
# C++11-related flags:
|
||||||
|
|
||||||
|
# This warns on using ints as initializers for floats in
|
||||||
|
# initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
|
||||||
|
# which happens in several places in chrome code. Not sure if
|
||||||
|
# this is worth fixing.
|
||||||
|
'-Wno-c++11-narrowing',
|
||||||
|
|
||||||
|
# Clang considers the `register` keyword as deprecated, but e.g.
|
||||||
|
# code generated by flex (used in angle) contains that keyword.
|
||||||
|
# http://crbug.com/255186
|
||||||
|
'-Wno-deprecated-register',
|
||||||
|
],
|
||||||
},
|
},
|
||||||
|
'includes': [ 'set_clang_warning_flags.gypi', ],
|
||||||
'defines': [
|
'defines': [
|
||||||
# Don't use deprecated V8 APIs anywhere.
|
# Don't use deprecated V8 APIs anywhere.
|
||||||
'V8_DEPRECATION_WARNINGS',
|
'V8_DEPRECATION_WARNINGS',
|
||||||
@@ -2873,18 +2906,7 @@
|
|||||||
'defines': ['OS_CHROMEOS=1'],
|
'defines': ['OS_CHROMEOS=1'],
|
||||||
}],
|
}],
|
||||||
['enable_wexit_time_destructors==1', {
|
['enable_wexit_time_destructors==1', {
|
||||||
'conditions': [
|
'variables': { 'clang_warning_flags': ['-Wexit-time-destructors']},
|
||||||
[ 'clang==1', {
|
|
||||||
'cflags': [
|
|
||||||
'-Wexit-time-destructors',
|
|
||||||
],
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
'-Wexit-time-destructors',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}],
|
}],
|
||||||
['chromium_code==0', {
|
['chromium_code==0', {
|
||||||
'conditions': [
|
'conditions': [
|
||||||
@@ -3865,38 +3887,8 @@
|
|||||||
}],
|
}],
|
||||||
['clang==1', {
|
['clang==1', {
|
||||||
'cflags': [
|
'cflags': [
|
||||||
'-Wheader-hygiene',
|
|
||||||
|
|
||||||
# Don't die on dtoa code that uses a char as an array index.
|
|
||||||
'-Wno-char-subscripts',
|
|
||||||
|
|
||||||
# TODO(thakis): This used to be implied by -Wno-unused-function,
|
|
||||||
# which we no longer use. Check if it makes sense to remove
|
|
||||||
# this as well. http://crbug.com/316352
|
|
||||||
'-Wno-unneeded-internal-declaration',
|
|
||||||
|
|
||||||
# Warns on switches on enums that cover all enum values but
|
|
||||||
# also contain a default: branch. Chrome is full of that.
|
|
||||||
'-Wno-covered-switch-default',
|
|
||||||
|
|
||||||
# Warns when a const char[] is converted to bool.
|
|
||||||
'-Wstring-conversion',
|
|
||||||
|
|
||||||
# C++11-related flags:
|
|
||||||
|
|
||||||
# This warns on using ints as initializers for floats in
|
|
||||||
# initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
|
|
||||||
# which happens in several places in chrome code. Not sure if
|
|
||||||
# this is worth fixing.
|
|
||||||
'-Wno-c++11-narrowing',
|
|
||||||
|
|
||||||
# TODO(thakis): Remove, http://crbug.com/263960
|
# TODO(thakis): Remove, http://crbug.com/263960
|
||||||
'-Wno-reserved-user-defined-literal',
|
'-Wno-reserved-user-defined-literal',
|
||||||
|
|
||||||
# Clang considers the `register` keyword as deprecated, but e.g.
|
|
||||||
# code generated by flex (used in angle) contains that keyword.
|
|
||||||
# http://crbug.com/255186
|
|
||||||
'-Wno-deprecated-register',
|
|
||||||
],
|
],
|
||||||
'cflags_cc': [
|
'cflags_cc': [
|
||||||
# See the comment in the Mac section for what it takes to move
|
# See the comment in the Mac section for what it takes to move
|
||||||
@@ -4675,35 +4667,6 @@
|
|||||||
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
|
'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
|
||||||
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
|
'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
|
||||||
'WARNING_CFLAGS': [
|
'WARNING_CFLAGS': [
|
||||||
'-Wheader-hygiene',
|
|
||||||
|
|
||||||
# This warns on using ints as initializers for floats in
|
|
||||||
# initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
|
|
||||||
# which happens in several places in chrome code. Not sure if
|
|
||||||
# this is worth fixing.
|
|
||||||
'-Wno-c++11-narrowing',
|
|
||||||
|
|
||||||
# Don't die on dtoa code that uses a char as an array index.
|
|
||||||
# This is required solely for base/third_party/dmg_fp/dtoa.cc.
|
|
||||||
'-Wno-char-subscripts',
|
|
||||||
|
|
||||||
# TODO(thakis): This used to be implied by -Wno-unused-function,
|
|
||||||
# which we no longer use. Check if it makes sense to remove
|
|
||||||
# this as well. http://crbug.com/316352
|
|
||||||
'-Wno-unneeded-internal-declaration',
|
|
||||||
|
|
||||||
# Warns on switches on enums that cover all enum values but
|
|
||||||
# also contain a default: branch. Chrome is full of that.
|
|
||||||
'-Wno-covered-switch-default',
|
|
||||||
|
|
||||||
# Warns when a const char[] is converted to bool.
|
|
||||||
'-Wstring-conversion',
|
|
||||||
|
|
||||||
# Clang considers the `register` keyword as deprecated, but
|
|
||||||
# e.g. code generated by flex (used in angle) contains that
|
|
||||||
# keyword. http://crbug.com/255186
|
|
||||||
'-Wno-deprecated-register',
|
|
||||||
|
|
||||||
# This warns on selectors from Cocoa headers (-length, -set).
|
# This warns on selectors from Cocoa headers (-length, -set).
|
||||||
# cfe-dev is currently discussing the merits of this warning.
|
# cfe-dev is currently discussing the merits of this warning.
|
||||||
# TODO(thakis): Reevaluate what to do with this, based one
|
# TODO(thakis): Reevaluate what to do with this, based one
|
||||||
|
44
build/set_clang_warning_flags.gypi
Normal file
44
build/set_clang_warning_flags.gypi
Normal file
@@ -0,0 +1,44 @@
|
|||||||
|
# Copyright (c) 2014 The Chromium Authors. All rights reserved.
|
||||||
|
# Use of this source code is governed by a BSD-style license that can be
|
||||||
|
# found in the LICENSE file.
|
||||||
|
|
||||||
|
# This file is meant to be included to set clang-specific compiler flags.
|
||||||
|
# To use this the following variable can be defined:
|
||||||
|
# clang_warning_flags: list: Compiler flags to pass to clang.
|
||||||
|
# clang_warning_flags_unset: list: Compiler flags to not pass to clang.
|
||||||
|
#
|
||||||
|
# Only use this in third-party code. In chromium_code, fix your code to not
|
||||||
|
# warn instead!
|
||||||
|
#
|
||||||
|
# Note that the gypi file is included in target_defaults, so it does not need
|
||||||
|
# to be explicitly included.
|
||||||
|
#
|
||||||
|
# Warning flags set by this will be used on all platforms. If you want to set
|
||||||
|
# warning flags on only some platforms, you have to do so manually.
|
||||||
|
#
|
||||||
|
# To use this, create a gyp target with the following form:
|
||||||
|
# {
|
||||||
|
# 'target_name': 'my_target',
|
||||||
|
# 'variables': {
|
||||||
|
# 'clang_warning_flags': ['-Wno-awesome-warning'],
|
||||||
|
# 'clang_warning_flags_unset': ['-Wpreviously-set-flag'],
|
||||||
|
# }
|
||||||
|
# }
|
||||||
|
|
||||||
|
{
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags_unset%': [], # Provide a default value.
|
||||||
|
},
|
||||||
|
'conditions': [
|
||||||
|
['clang==1', {
|
||||||
|
# This uses >@ instead of @< to also see clang_warning_flags set in
|
||||||
|
# targets directly, not just the clang_warning_flags in target_defaults.
|
||||||
|
'cflags': [ '>@(clang_warning_flags)' ],
|
||||||
|
'cflags!': [ '>@(clang_warning_flags_unset)' ],
|
||||||
|
'xcode_settings': {
|
||||||
|
'WARNING_CFLAGS': ['>@(clang_warning_flags)'],
|
||||||
|
'WARNING_CFLAGS!': ['>@(clang_warning_flags_unset)'],
|
||||||
|
},
|
||||||
|
}],
|
||||||
|
],
|
||||||
|
}
|
@@ -19,7 +19,13 @@
|
|||||||
'ext',
|
'ext',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'variables': {
|
||||||
|
# TODO(scottmg): http://crbug.com/177306
|
||||||
|
'clang_warning_flags_unset': [
|
||||||
|
# Don't warn about string->bool used in asserts.
|
||||||
|
'-Wstring-conversion',
|
||||||
|
],
|
||||||
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
# Note: file list duplicated in GN build.
|
# Note: file list duplicated in GN build.
|
||||||
'ext/analysis_canvas.cc',
|
'ext/analysis_canvas.cc',
|
||||||
@@ -99,18 +105,6 @@
|
|||||||
'skia_chrome_opts',
|
'skia_chrome_opts',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
# TODO(scottmg): http://crbug.com/177306
|
|
||||||
['clang==1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS!': [
|
|
||||||
# Don't warn about string->bool used in asserts.
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags!': [
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
[ 'OS != "android" and (OS != "linux" or use_cairo==1)', {
|
[ 'OS != "android" and (OS != "linux" or use_cairo==1)', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'ext/bitmap_platform_device_skia.cc',
|
'ext/bitmap_platform_device_skia.cc',
|
||||||
|
@@ -137,6 +137,11 @@
|
|||||||
'skia_support_pdf': 1,
|
'skia_support_pdf': 1,
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
# TODO(scottmg): http://crbug.com/177306
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# Don't warn about string->bool used in asserts.
|
||||||
|
'-Wstring-conversion',
|
||||||
|
]
|
||||||
},
|
},
|
||||||
'skia_support_gpu': '<(skia_support_gpu)',
|
'skia_support_gpu': '<(skia_support_gpu)',
|
||||||
'skia_support_pdf': '<(skia_support_pdf)',
|
'skia_support_pdf': '<(skia_support_pdf)',
|
||||||
|
@@ -358,18 +358,6 @@
|
|||||||
'../third_party/skia/src/utils/win/SkHRESULT.cpp',
|
'../third_party/skia/src/utils/win/SkHRESULT.cpp',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
# TODO(scottmg): http://crbug.com/177306
|
|
||||||
['clang==1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS!': [
|
|
||||||
# Don't warn about string->bool used in asserts.
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags!': [
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
'target_conditions': [
|
'target_conditions': [
|
||||||
# Pull in specific Mac files for iOS (which have been filtered out
|
# Pull in specific Mac files for iOS (which have been filtered out
|
||||||
|
36
third_party/libxml/libxml.gyp
vendored
36
third_party/libxml/libxml.gyp
vendored
@@ -188,6 +188,21 @@
|
|||||||
# defines the macro FOO as 1.)
|
# defines the macro FOO as 1.)
|
||||||
'LIBXML_STATIC=',
|
'LIBXML_STATIC=',
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# libxml passes `const unsigned char*` through `const char*`.
|
||||||
|
'-Wno-pointer-sign',
|
||||||
|
# pattern.c and uri.c both have an intentional
|
||||||
|
# `for (...);` / `while(...);` loop. I submitted a patch to
|
||||||
|
# move the `'` to its own line, but until that's landed
|
||||||
|
# suppress the warning:
|
||||||
|
'-Wno-empty-body',
|
||||||
|
# debugXML.c compares array 'arg' to NULL.
|
||||||
|
'-Wno-tautological-pointer-compare',
|
||||||
|
# See http://crbug.com/138571#c8
|
||||||
|
'-Wno-ignored-attributes',
|
||||||
|
],
|
||||||
|
},
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(os_include)',
|
'<(os_include)',
|
||||||
'<(os_include)/include',
|
'<(os_include)/include',
|
||||||
@@ -234,27 +249,6 @@
|
|||||||
'product_name': 'xml2',
|
'product_name': 'xml2',
|
||||||
}],
|
}],
|
||||||
['clang==1', {
|
['clang==1', {
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
# libxml passes `const unsigned char*` through `const char*`.
|
|
||||||
'-Wno-pointer-sign',
|
|
||||||
# pattern.c and uri.c both have an intentional
|
|
||||||
# `for (...);` / `while(...);` loop. I submitted a patch to
|
|
||||||
# move the `'` to its own line, but until that's landed
|
|
||||||
# suppress the warning:
|
|
||||||
'-Wno-empty-body',
|
|
||||||
# debugXML.c compares array 'arg' to NULL.
|
|
||||||
'-Wno-tautological-pointer-compare',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-pointer-sign',
|
|
||||||
'-Wno-empty-body',
|
|
||||||
'-Wno-tautological-pointer-compare',
|
|
||||||
|
|
||||||
# See http://crbug.com/138571#c8
|
|
||||||
'-Wno-ignored-attributes',
|
|
||||||
],
|
|
||||||
'msvs_settings': {
|
'msvs_settings': {
|
||||||
'VCCLCompilerTool': {
|
'VCCLCompilerTool': {
|
||||||
'AdditionalOptions': [
|
'AdditionalOptions': [
|
||||||
|
17
third_party/libxslt/libxslt.gyp
vendored
17
third_party/libxslt/libxslt.gyp
vendored
@@ -106,19 +106,14 @@
|
|||||||
'.',
|
'.',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# libxslt stores a char[3] in a `const unsigned char*`.
|
||||||
|
'-Wno-pointer-sign',
|
||||||
|
],
|
||||||
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS!="win"', {'product_name': 'xslt'}],
|
['OS!="win"', {'product_name': 'xslt'}],
|
||||||
['clang == 1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
# libxslt stores a char[3] in a `const unsigned char*`.
|
|
||||||
'-Wno-pointer-sign',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-pointer-sign',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
28
third_party/mesa/mesa.gyp
vendored
28
third_party/mesa/mesa.gyp
vendored
@@ -129,6 +129,15 @@
|
|||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
4005, 4018, 4065, 4090, 4099, 4273, 4291, 4345, 4267,
|
4005, 4018, 4065, 4090, 4099, 4273, 4291, 4345, 4267,
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
'-Wno-tautological-constant-out-of-range-compare',
|
||||||
|
],
|
||||||
|
'clang_warning_flags_unset': [
|
||||||
|
# Don't warn about string->bool used in asserts.
|
||||||
|
'-Wstring-conversion',
|
||||||
|
],
|
||||||
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
'<(generated_src_dir)/mesa/main/dispatch.h',
|
'<(generated_src_dir)/mesa/main/dispatch.h',
|
||||||
'src/src/glsl/ast_expr.cpp',
|
'src/src/glsl/ast_expr.cpp',
|
||||||
@@ -230,25 +239,6 @@
|
|||||||
'src/src/glsl/strtod.c',
|
'src/src/glsl/strtod.c',
|
||||||
'src/src/glsl/strtod.h',
|
'src/src/glsl/strtod.h',
|
||||||
],
|
],
|
||||||
'conditions': [
|
|
||||||
['clang == 1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
'-Wno-tautological-constant-out-of-range-compare',
|
|
||||||
],
|
|
||||||
'WARNING_CFLAGS!': [
|
|
||||||
# Don't warn about string->bool used in asserts.
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-tautological-constant-out-of-range-compare',
|
|
||||||
],
|
|
||||||
'cflags!': [
|
|
||||||
'-Wstring-conversion',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'target_name': 'mesa',
|
'target_name': 'mesa',
|
||||||
|
25
third_party/snappy/snappy.gyp
vendored
25
third_party/snappy/snappy.gyp
vendored
@@ -30,6 +30,13 @@
|
|||||||
'src',
|
'src',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags_unset': [
|
||||||
|
# snappy-stubs-internal.h unapologetically has: using namespace std
|
||||||
|
# https://code.google.com/p/snappy/issues/detail?id=70
|
||||||
|
'-Wheader-hygiene',
|
||||||
|
],
|
||||||
|
},
|
||||||
'sources': [
|
'sources': [
|
||||||
'src/snappy-internal.h',
|
'src/snappy-internal.h',
|
||||||
'src/snappy-sinksource.cc',
|
'src/snappy-sinksource.cc',
|
||||||
@@ -40,14 +47,6 @@
|
|||||||
'src/snappy.h',
|
'src/snappy.h',
|
||||||
],
|
],
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['clang == 1', {
|
|
||||||
# snappy-stubs-internal.h unapologetically has: using namespace std
|
|
||||||
# https://code.google.com/p/snappy/issues/detail?id=70
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS!': [ '-Wheader-hygiene' ],
|
|
||||||
},
|
|
||||||
'cflags': [ '-Wno-header-hygiene' ],
|
|
||||||
}],
|
|
||||||
['OS=="linux" or OS=="mac"', {
|
['OS=="linux" or OS=="mac"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
# TODO(tfarina): Only Mac and Linux has the generated config.h for
|
# TODO(tfarina): Only Mac and Linux has the generated config.h for
|
||||||
@@ -81,6 +80,10 @@
|
|||||||
'../../testing/gtest.gyp:gtest',
|
'../../testing/gtest.gyp:gtest',
|
||||||
'../../third_party/zlib/zlib.gyp:zlib',
|
'../../third_party/zlib/zlib.gyp:zlib',
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [ '-Wno-return-type' ],
|
||||||
|
'clang_warning_flags_unset': [ '-Wheader-hygiene' ],
|
||||||
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="linux" or OS=="mac"', {
|
['OS=="linux" or OS=="mac"', {
|
||||||
'defines': [
|
'defines': [
|
||||||
@@ -90,12 +93,6 @@
|
|||||||
'HAVE_CONFIG_H=1',
|
'HAVE_CONFIG_H=1',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['clang == 1', {
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-return-type',
|
|
||||||
'-Wno-header-hygiene'
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
22
third_party/sqlite/sqlite.gyp
vendored
22
third_party/sqlite/sqlite.gyp
vendored
@@ -119,6 +119,14 @@
|
|||||||
'msvs_disabled_warnings': [
|
'msvs_disabled_warnings': [
|
||||||
4018, 4244, 4267,
|
4018, 4244, 4267,
|
||||||
],
|
],
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# sqlite does `if (*a++ && *b++);` in a non-buggy way.
|
||||||
|
'-Wno-empty-body',
|
||||||
|
# sqlite has some `unsigned < 0` checks.
|
||||||
|
'-Wno-tautological-compare',
|
||||||
|
],
|
||||||
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS=="linux"', {
|
['OS=="linux"', {
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
@@ -153,20 +161,6 @@
|
|||||||
'-Wno-pointer-to-int-cast',
|
'-Wno-pointer-to-int-cast',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['clang==1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
# sqlite does `if (*a++ && *b++);` in a non-buggy way.
|
|
||||||
'-Wno-empty-body',
|
|
||||||
# sqlite has some `unsigned < 0` checks.
|
|
||||||
'-Wno-tautological-compare',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-empty-body',
|
|
||||||
'-Wno-tautological-compare',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
|
17
third_party/zlib/zlib.gyp
vendored
17
third_party/zlib/zlib.gyp
vendored
@@ -77,6 +77,12 @@
|
|||||||
'.',
|
'.',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
'variables': {
|
||||||
|
'clang_warning_flags': [
|
||||||
|
# zlib uses `if ((a == b))` for some reason.
|
||||||
|
'-Wno-parentheses-equality',
|
||||||
|
],
|
||||||
|
},
|
||||||
'conditions': [
|
'conditions': [
|
||||||
['OS!="win"', {
|
['OS!="win"', {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
@@ -94,17 +100,6 @@
|
|||||||
'USE_FILE32API'
|
'USE_FILE32API'
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['clang==1', {
|
|
||||||
'xcode_settings': {
|
|
||||||
'WARNING_CFLAGS': [
|
|
||||||
# zlib uses `if ((a == b))` for some reason.
|
|
||||||
'-Wno-parentheses-equality',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'-Wno-parentheses-equality',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user