Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3813)

Unified Diff: build/scripts/master/factory/chromium_factory.py

Issue 142373002: Set use_goma=1 and gomadir=path in GYP_DEFINES on master. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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'):
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698