Test-...-Release-SK_FOO --> -DSK_FOO

When a bot ends with extra_config SK_LIKE_THIS,
we'll define SK_LIKE_THIS when compiling.

CQ_EXTRA_TRYBOTS=client.skia:Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SK_USE_DISCARDABLE_SCALEDIMAGECACHE-Trybot,Test-Ubuntu-GCC-GCE-CPU-AVX2-x86_64-Release-SKNX_NO_SIMD-Trybot

BUG=skia:4354

Review URL: https://codereview.chromium.org/1346833004
This commit is contained in:
mtklein 2015-09-18 06:15:55 -07:00 committed by Commit bot
parent ef6c50a80f
commit d0fff5b6d8
2 changed files with 7 additions and 5 deletions

View File

@ -2910,7 +2910,8 @@
"do_perf_steps": false,
"do_test_steps": true,
"env": {
"GYP_DEFINES": "skia_arch_type=x86_64 skia_gpu=0 skia_warnings_as_errors=0 sknx_no_simd=1"
"CPPFLAGS": "-DSKNX_NO_SIMD",
"GYP_DEFINES": "skia_arch_type=x86_64 skia_gpu=0 skia_warnings_as_errors=0"
},
"nanobench_flags": [
"--scales",

View File

@ -140,10 +140,6 @@ def gyp_defines(builder_dict):
builder_dict.get('cpu_or_gpu_value') == 'Mesa'):
gyp_defs['skia_mesa'] = '1'
# SKNX_NO_SIMD
if builder_dict.get('extra_config') == 'SKNX_NO_SIMD':
gyp_defs['sknx_no_simd'] = '1'
# skia_use_android_framework_defines.
if builder_dict.get('extra_config') == 'Android_FrameworkDefs':
gyp_defs['skia_use_android_framework_defines'] = '1'
@ -163,6 +159,11 @@ def get_extra_env_vars(builder_dict):
env['CC'] = '/usr/bin/clang'
env['CXX'] = '/usr/bin/clang++'
# SKNX_NO_SIMD, SK_USE_DISCARDABLE_SCALEDIMAGECACHE, etc.
extra_config = builder_dict.get('extra_config', '')
if extra_config.startswith('SK') and extra_config.isupper():
env['CPPFLAGS'] = '-D' + extra_config
return env