| OLD | NEW |
| 1 # conditions used in both common.gypi and skia.gyp in chromium | 1 # conditions used in both common.gypi and skia.gyp in chromium |
| 2 # | 2 # |
| 3 { | 3 { |
| 4 'defines': [ | 4 'defines': [ |
| 5 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', | 5 'SK_ALLOW_STATIC_GLOBAL_INITIALIZERS=<(skia_static_initializers)', |
| 6 # 'SK_SUPPORT_HINTING_SCALE_FACTOR', | 6 # 'SK_SUPPORT_HINTING_SCALE_FACTOR', |
| 7 ], | 7 ], |
| 8 'conditions' : [ | 8 'conditions' : [ |
| 9 ['skia_gpu == 1', | 9 [ 'skia_gpu == 1', |
| 10 { | 10 { |
| 11 'defines': [ | 11 'defines': [ |
| 12 'SK_SUPPORT_GPU=1', | 12 'SK_SUPPORT_GPU=1', |
| 13 ], | 13 ], |
| 14 }, { | 14 }, { |
| 15 'defines': [ | 15 'defines': [ |
| 16 'SK_SUPPORT_GPU=0', | 16 'SK_SUPPORT_GPU=0', |
| 17 ], | 17 ], |
| 18 }, | 18 }, |
| 19 ], | 19 ], |
| 20 ['skia_os == "win"', | 20 [ 'skia_os == "win"', |
| 21 { | 21 { |
| 22 'defines': [ | 22 'defines': [ |
| 23 'SK_BUILD_FOR_WIN32', | 23 'SK_BUILD_FOR_WIN32', |
| 24 'SK_IGNORE_STDINT_DOT_H', | 24 'SK_IGNORE_STDINT_DOT_H', |
| 25 '_CRT_SECURE_NO_WARNINGS', | 25 '_CRT_SECURE_NO_WARNINGS', |
| 26 'GR_GL_FUNCTION_TYPE=__stdcall', | 26 'GR_GL_FUNCTION_TYPE=__stdcall', |
| 27 ], | 27 ], |
| 28 'msvs_cygwin_shell': 0, | 28 'msvs_cygwin_shell': 0, |
| 29 'msvs_settings': { | 29 'msvs_settings': { |
| 30 'VCCLCompilerTool': { | 30 'VCCLCompilerTool': { |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 79 'GenerateDebugInformation': 'true', # /DEBUG | 79 'GenerateDebugInformation': 'true', # /DEBUG |
| 80 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration
/LTCG | 80 'LinkTimeCodeGeneration': '1', # useLinkTimeCodeGeneration
/LTCG |
| 81 }, | 81 }, |
| 82 'VCLibrarianTool': { | 82 'VCLibrarianTool': { |
| 83 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration
/LTCG | 83 'LinkTimeCodeGeneration': 'true', # useLinkTimeCodeGeneration
/LTCG |
| 84 }, | 84 }, |
| 85 }, | 85 }, |
| 86 }, | 86 }, |
| 87 }, | 87 }, |
| 88 'conditions' : [ | 88 'conditions' : [ |
| 89 ['skia_arch_width == 64', { | 89 [ 'skia_arch_width == 64', { |
| 90 'msvs_configuration_platform': 'x64', | 90 'msvs_configuration_platform': 'x64', |
| 91 }], |
| 92 [ 'skia_arch_width == 32', { |
| 93 'msvs_configuration_platform': 'Win32', |
| 94 }], |
| 95 [ 'skia_warnings_as_errors', { |
| 91 'msvs_settings': { | 96 'msvs_settings': { |
| 92 'VCCLCompilerTool': { | 97 'VCCLCompilerTool': { |
| 93 'WarnAsError': 'false', | 98 'WarnAsError': 'true', |
| 94 }, | 99 }, |
| 95 }, | 100 }, |
| 96 }], | 101 }], |
| 97 ['skia_arch_width == 32', { | |
| 98 # This gypi file will be included directly into the gyp(i) files in
the angle repo by | |
| 99 # our gyp_skia script. We don't want force WarnAsError on angle. So
angle.gyp defines | |
| 100 # skia_building_angle=1 and here we select whether to enable WarnAsE
rror based on that | |
| 101 # var's value. Here it defaults to 0. | |
| 102 'variables' : { | |
| 103 'skia_building_angle%': 0, | |
| 104 }, | |
| 105 'conditions' : [ | |
| 106 ['skia_building_angle', { | |
| 107 'msvs_configuration_platform': 'Win32', | |
| 108 'msvs_settings': { | |
| 109 'VCCLCompilerTool': { | |
| 110 'WarnAsError': 'false', | |
| 111 }, | |
| 112 }, | |
| 113 },{ # not angle | |
| 114 'msvs_configuration_platform': 'Win32', | |
| 115 'msvs_settings': { | |
| 116 'VCCLCompilerTool': { | |
| 117 'WarnAsError': 'true', | |
| 118 }, | |
| 119 }, | |
| 120 }], | |
| 121 ], | |
| 122 }], | |
| 123 ], | 102 ], |
| 124 }, | 103 }, |
| 125 ], | 104 ], |
| 126 | 105 |
| 127 ['skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', | 106 [ 'skia_os in ["linux", "freebsd", "openbsd", "solaris", "nacl"]', |
| 128 { | 107 { |
| 129 'defines': [ | 108 'defines': [ |
| 130 'SK_SAMPLES_FOR_X', | 109 'SK_SAMPLES_FOR_X', |
| 131 'SK_BUILD_FOR_UNIX', | 110 'SK_BUILD_FOR_UNIX', |
| 132 ], | 111 ], |
| 133 'configurations': { | 112 'configurations': { |
| 134 'Debug': { | 113 'Debug': { |
| 135 'cflags': ['-g'] | 114 'cflags': ['-g'] |
| 136 }, | 115 }, |
| 137 'Release': { | 116 'Release': { |
| 138 'cflags': ['-O3 -g'], | 117 'cflags': ['-O3 -g'], |
| 139 'defines': [ 'NDEBUG' ], | 118 'defines': [ 'NDEBUG' ], |
| 140 }, | 119 }, |
| 141 }, | 120 }, |
| 142 'cflags': [ | 121 'cflags': [ |
| 143 '-Werror', | |
| 144 '-Wall', | 122 '-Wall', |
| 145 '-Wextra', | 123 '-Wextra', |
| 146 # suppressions below here were added for clang | 124 # suppressions below here were added for clang |
| 147 '-Wno-unused-parameter', | 125 '-Wno-unused-parameter', |
| 148 '-Wno-c++11-extensions' | 126 '-Wno-c++11-extensions' |
| 149 ], | 127 ], |
| 150 'conditions' : [ | 128 'conditions' : [ |
| 151 ['skia_warnings_as_errors == 1', { | 129 [ 'skia_warnings_as_errors', { |
| 152 'cflags': [ | 130 'cflags': [ |
| 153 '-Werror', | 131 '-Werror', |
| 154 ], | 132 ], |
| 155 }], | 133 }], |
| 156 ['skia_arch_width == 64', { | 134 [ 'skia_arch_width == 64', { |
| 157 'cflags': [ | 135 'cflags': [ |
| 158 '-m64', | 136 '-m64', |
| 159 ], | 137 ], |
| 160 'ldflags': [ | 138 'ldflags': [ |
| 161 '-m64', | 139 '-m64', |
| 162 ], | 140 ], |
| 163 }], | 141 }], |
| 164 ['skia_arch_width == 32', { | 142 [ 'skia_arch_width == 32', { |
| 165 'cflags': [ | 143 'cflags': [ |
| 166 '-m32', | 144 '-m32', |
| 167 ], | 145 ], |
| 168 'ldflags': [ | 146 'ldflags': [ |
| 169 '-m32', | 147 '-m32', |
| 170 ], | 148 ], |
| 171 }], | 149 }], |
| 172 [ 'skia_os == "nacl"', { | 150 [ 'skia_os == "nacl"', { |
| 173 'defines': [ | 151 'defines': [ |
| 174 'SK_BUILD_FOR_NACL', | 152 'SK_BUILD_FOR_NACL', |
| 175 ], | 153 ], |
| 176 'link_settings': { | 154 'link_settings': { |
| 177 'libraries': [ | 155 'libraries': [ |
| 178 '-lppapi', | 156 '-lppapi', |
| 179 '-lppapi_cpp', | 157 '-lppapi_cpp', |
| 180 '-lnosys', | 158 '-lnosys', |
| 181 '-pthread', | 159 '-pthread', |
| 182 ], | 160 ], |
| 183 }, | 161 }, |
| 184 }, { # skia_os != "nacl" | 162 }, { # skia_os != "nacl" |
| 185 'include_dirs' : [ | 163 'include_dirs' : [ |
| 186 '/usr/include/freetype2', | 164 '/usr/include/freetype2', |
| 187 ], | 165 ], |
| 188 }], | 166 }], |
| 189 ], | 167 ], |
| 190 }, | 168 }, |
| 191 ], | 169 ], |
| 192 | 170 |
| 193 ['skia_os == "mac"', | 171 [ 'skia_os == "mac"', |
| 194 { | 172 { |
| 195 'variables': { | 173 'variables': { |
| 196 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', | 174 'mac_sdk%': '<!(python <(DEPTH)/tools/find_mac_sdk.py 10.6)', |
| 197 }, | 175 }, |
| 198 'defines': [ | 176 'defines': [ |
| 199 'SK_BUILD_FOR_MAC', | 177 'SK_BUILD_FOR_MAC', |
| 200 ], | 178 ], |
| 201 'conditions' : [ | 179 'conditions' : [ |
| 202 ['skia_arch_width == 64', { | 180 [ 'skia_arch_width == 64', { |
| 203 'xcode_settings': { | 181 'xcode_settings': { |
| 204 'ARCHS': 'x86_64', | 182 'ARCHS': 'x86_64', |
| 205 }, | 183 }, |
| 206 }], | 184 }], |
| 207 ['skia_arch_width == 32', { | 185 [ 'skia_arch_width == 32', { |
| 208 'xcode_settings': { | 186 'xcode_settings': { |
| 209 'ARCHS': 'i386', | 187 'ARCHS': 'i386', |
| 188 }, |
| 189 }], |
| 190 [ 'skia_warnings_as_errors and skia_arch_width == 32', { |
| 191 'xcode_settings': { |
| 210 'OTHER_CPLUSPLUSFLAGS': [ | 192 'OTHER_CPLUSPLUSFLAGS': [ |
| 211 '-Werror', | 193 '-Werror', |
| 212 ], | 194 ], |
| 213 }, | 195 }, |
| 214 }], | 196 }], |
| 215 ], | 197 ], |
| 216 'configurations': { | 198 'configurations': { |
| 217 'Debug': { | 199 'Debug': { |
| 218 'xcode_settings': { | 200 'xcode_settings': { |
| 219 'GCC_OPTIMIZATION_LEVEL': '0', | 201 'GCC_OPTIMIZATION_LEVEL': '0', |
| 220 }, | 202 }, |
| 221 }, | 203 }, |
| 222 'Release': { | 204 'Release': { |
| 223 'xcode_settings': { | 205 'xcode_settings': { |
| 224 'GCC_OPTIMIZATION_LEVEL': '3', | 206 'GCC_OPTIMIZATION_LEVEL': '3', |
| 225 }, | 207 }, |
| 226 'defines': [ 'NDEBUG' ], | 208 'defines': [ 'NDEBUG' ], |
| 227 }, | 209 }, |
| 228 }, | 210 }, |
| 229 'xcode_settings': { | 211 'xcode_settings': { |
| 230 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', | 212 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO', |
| 231 'conditions': [ | 213 'conditions': [ |
| 232 ['skia_osx_sdkroot==""', { | 214 [ 'skia_osx_sdkroot==""', { |
| 233 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot | 215 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot |
| 234 }, { | 216 }, { |
| 235 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot | 217 'SDKROOT': '<(skia_osx_sdkroot)', # -isysroot |
| 236 }], | 218 }], |
| 237 ], | 219 ], |
| 238 # trying to get this to work, but it needs clang I think... | 220 # trying to get this to work, but it needs clang I think... |
| 239 # 'WARNING_CFLAGS': '-Wexit-time-destructors', | 221 # 'WARNING_CFLAGS': '-Wexit-time-destructors', |
| 240 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', | 222 'CLANG_WARN_CXX0X_EXTENSIONS': 'NO', |
| 241 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES', | 223 'GCC_WARN_64_TO_32_BIT_CONVERSION': 'YES', |
| 242 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES', | 224 'GCC_WARN_ABOUT_DEPRECATED_FUNCTIONS': 'YES', |
| (...skipping 15 matching lines...) Expand all Loading... |
| 258 'GCC_WARN_UNUSED_VARIABLE': 'YES', | 240 'GCC_WARN_UNUSED_VARIABLE': 'YES', |
| 259 'OTHER_CPLUSPLUSFLAGS': [ | 241 'OTHER_CPLUSPLUSFLAGS': [ |
| 260 '-mssse3', | 242 '-mssse3', |
| 261 '-fvisibility=hidden', | 243 '-fvisibility=hidden', |
| 262 '-fvisibility-inlines-hidden', | 244 '-fvisibility-inlines-hidden', |
| 263 ], | 245 ], |
| 264 }, | 246 }, |
| 265 }, | 247 }, |
| 266 ], | 248 ], |
| 267 | 249 |
| 268 ['skia_os == "ios"', | 250 [ 'skia_os == "ios"', |
| 269 { | 251 { |
| 270 'defines': [ | 252 'defines': [ |
| 271 'SK_BUILD_FOR_IOS', | 253 'SK_BUILD_FOR_IOS', |
| 272 ], | 254 ], |
| 255 'conditions' : [ |
| 256 [ 'skia_warnings_as_errors', { |
| 257 'xcode_settings': { |
| 258 'OTHER_CPLUSPLUSFLAGS': [ |
| 259 '-Werror', |
| 260 ], |
| 261 }, |
| 262 }], |
| 263 ], |
| 273 'configurations': { | 264 'configurations': { |
| 274 'Debug': { | 265 'Debug': { |
| 275 'xcode_settings': { | 266 'xcode_settings': { |
| 276 'GCC_OPTIMIZATION_LEVEL': '0', | 267 'GCC_OPTIMIZATION_LEVEL': '0', |
| 277 }, | 268 }, |
| 278 }, | 269 }, |
| 279 'Release': { | 270 'Release': { |
| 280 'xcode_settings': { | 271 'xcode_settings': { |
| 281 'GCC_OPTIMIZATION_LEVEL': '3', | 272 'GCC_OPTIMIZATION_LEVEL': '3', |
| 282 }, | 273 }, |
| 283 'defines': [ 'NDEBUG' ], | 274 'defines': [ 'NDEBUG' ], |
| 284 }, | 275 }, |
| 285 }, | 276 }, |
| 286 'xcode_settings': { | 277 'xcode_settings': { |
| 287 'ARCHS': 'armv6 armv7', | 278 'ARCHS': 'armv6 armv7', |
| 288 'CODE_SIGNING_REQUIRED': 'NO', | 279 'CODE_SIGNING_REQUIRED': 'NO', |
| 289 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', | 280 'CODE_SIGN_IDENTITY[sdk=iphoneos*]': '', |
| 290 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', | 281 'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_sdk_version)', |
| 291 'SDKROOT': 'iphoneos', | 282 'SDKROOT': 'iphoneos', |
| 292 'TARGETED_DEVICE_FAMILY': '1,2', | 283 'TARGETED_DEVICE_FAMILY': '1,2', |
| 293 'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidd
en', | 284 'OTHER_CPLUSPLUSFLAGS': '-fvisibility=hidden -fvisibility-inlines-hidd
en', |
| 294 'GCC_THUMB_SUPPORT': 'NO', | 285 'GCC_THUMB_SUPPORT': 'NO', |
| 295 }, | 286 }, |
| 296 }, | 287 }, |
| 297 ], | 288 ], |
| 298 | 289 |
| 299 ['skia_os == "android"', | 290 [ 'skia_os == "android"', |
| 300 { | 291 { |
| 301 'defines': [ | 292 'defines': [ |
| 302 'SK_BUILD_FOR_ANDROID', | 293 'SK_BUILD_FOR_ANDROID', |
| 303 ], | 294 ], |
| 304 'configurations': { | 295 'configurations': { |
| 305 'Debug': { | 296 'Debug': { |
| 306 'cflags': ['-g'] | 297 'cflags': ['-g'] |
| 307 }, | 298 }, |
| 308 'Release': { | 299 'Release': { |
| 309 'cflags': ['-O2'], | 300 'cflags': ['-O2'], |
| 310 'defines': [ 'NDEBUG' ], | 301 'defines': [ 'NDEBUG' ], |
| 311 }, | 302 }, |
| 312 }, | 303 }, |
| 313 'libraries': [ | 304 'libraries': [ |
| 314 '-lstdc++', | 305 '-lstdc++', |
| 315 '-lm', | 306 '-lm', |
| 316 '-llog', | 307 '-llog', |
| 317 ], | 308 ], |
| 318 'cflags': [ | 309 'cflags': [ |
| 319 '-Wall', | 310 '-Wall', |
| 320 '-fno-exceptions', | 311 '-fno-exceptions', |
| 321 '-fno-rtti', | 312 '-fno-rtti', |
| 322 '-fstrict-aliasing', | 313 '-fstrict-aliasing', |
| 323 '-fuse-ld=gold', | 314 '-fuse-ld=gold', |
| 324 ], | 315 ], |
| 325 'conditions': [ | 316 'conditions': [ |
| 326 [ 'skia_warnings_as_errors == 1', { | 317 [ 'skia_warnings_as_errors', { |
| 327 'cflags': [ | 318 'cflags': [ |
| 328 '-Werror', | 319 '-Werror', |
| 329 ], | 320 ], |
| 330 }], | 321 }], |
| 331 [ 'skia_profile_enabled == 1', { | 322 [ 'skia_profile_enabled == 1', { |
| 332 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], | 323 'cflags': ['-g', '-fno-omit-frame-pointer', '-marm', '-mapcs'], |
| 333 }], | 324 }], |
| 334 [ 'skia_arch_type == "arm" and arm_thumb == 1', { | 325 [ 'skia_arch_type == "arm" and arm_thumb == 1', { |
| 335 'cflags': [ | 326 'cflags': [ |
| 336 '-mthumb', | 327 '-mthumb', |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 383 'xcode_settings': { | 374 'xcode_settings': { |
| 384 'SYMROOT': '<(DEPTH)/xcodebuild', | 375 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 385 }, | 376 }, |
| 386 } | 377 } |
| 387 | 378 |
| 388 # Local Variables: | 379 # Local Variables: |
| 389 # tab-width:2 | 380 # tab-width:2 |
| 390 # indent-tabs-mode:nil | 381 # indent-tabs-mode:nil |
| 391 # End: | 382 # End: |
| 392 # vim: set expandtab tabstop=2 shiftwidth=2: | 383 # vim: set expandtab tabstop=2 shiftwidth=2: |
| OLD | NEW |