Refactor skia_warnings_as_errors
Review URL: https://codereview.chromium.org/12963002
git-svn-id: http://skia.googlecode.com/svn/trunk@8330 2bbb7eff-a529-9590-31e7-b0007b416f81
diff --git a/gyp/common_variables.gypi b/gyp/common_variables.gypi
index 8ddbbb4..4f9f542 100644
--- a/gyp/common_variables.gypi
+++ b/gyp/common_variables.gypi
@@ -89,12 +89,19 @@
'skia_gpu%': 1,
'skia_osx_sdkroot%': '',
'skia_profile_enabled%': 0,
- # Note: This is currently only turned on for linux and android.
- # TODO: Turn on for Win and Mac as well.
- 'skia_warnings_as_errors%': 0,
'skia_win_debuggers_path%': '',
},
+ 'conditions': [
+ [ 'skia_os == "win" and skia_arch_width == 32 or '
+ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "android"] or '
+ 'skia_os == "mac" and skia_arch_width == 32', {
+ 'skia_warnings_as_errors%': 1,
+ }, {
+ 'skia_warnings_as_errors%': 0,
+ }],
+ ],
+
# Re-define all variables defined within the level-2 'variables' dict,
# so that siblings of the level-1 'variables' dict can see them.
'armv7%': '<(armv7)',
@@ -114,7 +121,6 @@
'skia_gpu%': '<(skia_gpu)',
'skia_osx_sdkroot%': '<(skia_osx_sdkroot)',
'skia_profile_enabled%': '<(skia_profile_enabled)',
- 'skia_warnings_as_errors%': '<(skia_warnings_as_errors)',
'skia_static_initializers%': '<(skia_static_initializers)',
'ios_sdk_version%': '6.0',
'skia_win_debuggers_path%': '<(skia_win_debuggers_path)',