Index: build/scripts/master/factory/chromium_factory.py |
=================================================================== |
--- build/scripts/master/factory/chromium_factory.py (revision 262495) |
+++ build/scripts/master/factory/chromium_factory.py (working copy) |
@@ -70,8 +70,8 @@ |
gclient_env: a dict for gclient_env. |
""" |
options = options or {} |
- if (not '--compiler=goma' in options and |
- not '--compiler=goma-clang' in options): |
+ if ('--compiler=goma' not in options and |
+ '--compiler=goma-clang' not in options): |
return |
gyp_defines = gclient_env.get('GYP_DEFINES', '') |
# goma couldn't work with pdbserv. |
@@ -86,6 +86,22 @@ |
gclient_env['GYP_DEFINES'] = gyp_defines |
+def SetGomaGypDefines(options, gclient_env, target_platform): |
+ """Adds goma flags to GYP_DEFINES.""" |
+ options = options or {} |
+ if ('--compiler=goma' not in options and |
+ '--compiler=goma-clang' not in options and |
+ '--compiler=jsonclang' not in options): |
+ return |
+ if target_platform == 'win32': |
+ gomadir = r'C:\b\build\goma' |
+ else: |
+ gomadir = '/b/build/goma' |
iannucci
2014/04/08 20:45:50
!!!!!! :(
This terrifies me (and won't actually w
Nico
2014/04/08 20:51:09
We could add a gyp_chromium wrapper script. It's c
|
+ gyp_defines = gclient_env.get('GYP_DEFINES', '') |
+ gyp_defines += ' use_goma=1 gomadir=%s' % gomadir |
+ gclient_env['GYP_DEFINES'] = gyp_defines |
+ |
+ |
class ChromiumFactory(gclient_factory.GClientFactory): |
"""Encapsulates data and methods common to the chromium master.cfg files.""" |
@@ -988,6 +1004,8 @@ |
if self._target_platform == 'win32': |
factory_properties['gclient_env'].setdefault('GYP_MSVS_VERSION', '2010') |
FixForGomaWin(options, target, factory_properties['gclient_env']) |
+ SetGomaGypDefines( |
+ options, factory_properties['gclient_env'], self._target_platform) |
tests = tests or [] |
if factory_properties.get('needs_valgrind'): |