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

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

Issue 228903003: 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, 8 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 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'):
« 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