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

Unified Diff: gyp/common_conditions.gypi

Issue 12963002: Refactor skia_warnings_as_errors (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Fix merge conflicts and trybot failures Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | gyp/common_variables.gypi » ('j') | gyp/jsoncpp.gyp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gyp/common_conditions.gypi
===================================================================
--- gyp/common_conditions.gypi (revision 8270)
+++ gyp/common_conditions.gypi (working copy)
@@ -6,7 +6,7 @@
# 'SK_SUPPORT_HINTING_SCALE_FACTOR',
],
'conditions' : [
- ['skia_gpu == 1',
+ [ 'skia_gpu == 1',
{
'defines': [
'SK_SUPPORT_GPU=1',
@@ -17,7 +17,7 @@
],
},
],
- ['skia_os == "win"',
+ [ 'skia_os == "win"',
{
'defines': [
'SK_BUILD_FOR_WIN32',
@@ -86,45 +86,24 @@
},
},
'conditions' : [
- ['skia_arch_width == 64', {
+ [ 'skia_arch_width == 64', {
'msvs_configuration_platform': 'x64',
+ }],
+ [ 'skia_arch_width == 32', {
+ 'msvs_configuration_platform': 'Win32',
+ }],
+ [ 'skia_warnings_as_errors', {
'msvs_settings': {
'VCCLCompilerTool': {
- 'WarnAsError': 'false',
+ 'WarnAsError': 'true',
},
},
}],
- ['skia_arch_width == 32', {
- # This gypi file will be included directly into the gyp(i) files in the angle repo by
- # our gyp_skia script. We don't want force WarnAsError on angle. So angle.gyp defines
- # skia_building_angle=1 and here we select whether to enable WarnAsError based on that
- # var's value. Here it defaults to 0.
- 'variables' : {
- 'skia_building_angle%': 0,
- },
- 'conditions' : [
- ['skia_building_angle', {
- 'msvs_configuration_platform': 'Win32',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'false',
- },
- },
- },{ # not angle
- 'msvs_configuration_platform': 'Win32',
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'WarnAsError': 'true',
- },
- },
- }],
- ],
- }],
],
},
],
- ['skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]',
+ [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]',
{
'defines': [
'SK_SAMPLES_FOR_X',
@@ -140,7 +119,6 @@
},
},
'cflags': [
- '-Werror',
'-Wall',
'-Wextra',
# suppressions below here were added for clang
@@ -148,12 +126,12 @@
'-Wno-c++11-extensions'
],
'conditions' : [
- ['skia_warnings_as_errors == 1', {
+ [ 'skia_warnings_as_errors', {
'cflags': [
'-Werror',
],
}],
- ['skia_arch_width == 64', {
+ [ 'skia_arch_width == 64', {
'cflags': [
'-m64',
],
@@ -161,7 +139,7 @@
'-m64',
],
}],
- ['skia_arch_width == 32', {
+ [ 'skia_arch_width == 32', {
'cflags': [
'-m32',
],
@@ -190,7 +168,7 @@
},
],
- ['skia_os == "mac"',
+ [ 'skia_os == "mac"',
{
'variables': {
'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)',
@@ -199,14 +177,18 @@
'SK_BUILD_FOR_MAC',
],
'conditions' : [
- ['skia_arch_width == 64', {
+ [ 'skia_arch_width == 64', {
'xcode_settings': {
'ARCHS': 'x86_64',
},
}],
- ['skia_arch_width == 32', {
+ [ 'skia_arch_width == 32', {
'xcode_settings': {
'ARCHS': 'i386',
+ },
+ }],
+ [ 'skia_warnings_as_errors', {
+ 'xcode_settings': {
'OTHER_CPLUSPLUSFLAGS': [
'-Werror',
],
@@ -229,7 +211,7 @@
'xcode_settings': {
'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
'conditions': [
- ['skia_osx_sdkroot==""', {
+ [ 'skia_osx_sdkroot==""', {
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
}, {
'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot
@@ -265,11 +247,20 @@
},
],
- ['skia_os == "ios"',
+ [ 'skia_os == "ios"',
{
'defines': [
'SK_BUILD_FOR_IOS',
],
+ 'conditions' : [
+ [ 'skia_warnings_as_errors', {
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '-Werror',
+ ],
+ },
+ }],
+ ],
'configurations': {
'Debug': {
'xcode_settings': {
@@ -290,13 +281,16 @@
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)',
'SDKROOT': 'iphoneos',
'TARGETED_DEVICE_FAMILY': '1,2',
- 'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidden',
+ 'OTHER_CPLUSPLUSFLAGS': [
+ '-fvisibility=hidden',
+ '-fvisibility-inlines-hidden',
+ ],
'GCC_THUMB_SUPPORT': 'NO',
},
},
],
- ['skia_os == "android"',
+ [ 'skia_os == "android"',
{
'defines': [
'SK_BUILD_FOR_ANDROID',
@@ -323,7 +317,7 @@
'-fuse-ld=gold',
],
'conditions': [
- [ 'skia_warnings_as_errors == 1', {
+ [ 'skia_warnings_as_errors', {
'cflags': [
'-Werror',
],
« no previous file with comments | « no previous file | gyp/common_variables.gypi » ('j') | gyp/jsoncpp.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698