| Index: build/scripts/master/factory/chromium_factory.py
|
| ===================================================================
|
| --- build/scripts/master/factory/chromium_factory.py (revision 245768)
|
| +++ build/scripts/master/factory/chromium_factory.py (working copy)
|
| @@ -39,8 +39,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.
|
| @@ -55,6 +55,20 @@
|
| gclient_env['GYP_DEFINES'] = gyp_defines
|
|
|
|
|
| +def SetGomaGypDefines(options, target, gclient_env):
|
| + """Adds goma flags to GYP_DEFINES."""
|
| + options = options or {}
|
| + if ('--compiler=goma' not in options and
|
| + '--compiler=goma-clang' not in options):
|
| + return
|
| + # Starting from e.g. C:\b\build\slave\build_slave_path\build, find
|
| + # C:\b\build\goma.
|
| + gomadir = os.path.normpath(os.path.join('..', '..', '..', 'goma'))
|
| + 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."""
|
|
|
| @@ -954,6 +968,7 @@
|
| if self._target_platform == 'win32':
|
| factory_properties['gclient_env'].setdefault('GYP_MSVS_VERSION', '2010')
|
| FixForGomaWin(options, target, factory_properties['gclient_env'])
|
| + SetGomaGypDefines(options, target, factory_properties['gclient_env']):
|
| tests = tests or []
|
|
|
| if factory_properties.get('needs_valgrind'):
|
|
|