Test-...-Release-SK_FOO --> -DSK_FOO
authormtklein <mtklein@chromium.org>
Fri, 18 Sep 2015 13:15:55 +0000 (06:15 -0700)
committerCommit bot <commit-bot@chromium.org>
Fri, 18 Sep 2015 13:15:55 +0000 (06:15 -0700)
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

tools/buildbot_spec.json
tools/buildbot_spec.py

index 4c25c106ef2387a54195074f6ddd0cedc4c86c00..65e26030b3035c82ea50b4f42aa8fc882dce6ed9 100644 (file)
     "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", 
index b379366973c4061a989da964f8c0d7a2ee036ac9..f360a38778a92732a025c94b97dd790894a0fcdd 100755 (executable)
@@ -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