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

Unified Diff: tools/cr/cr/actions/ninja.py

Issue 212623012: Add GOMA_DIR to the set of searched paths, and default it to something sensible (.) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change to homedir default Created 6 years, 9 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: tools/cr/cr/actions/ninja.py
diff --git a/tools/cr/cr/actions/ninja.py b/tools/cr/cr/actions/ninja.py
index 448583442174eff6d0066df1321be70259b970ea..d2e77b0aaca7252d7e4004a64b323436fbd60deb 100644
--- a/tools/cr/cr/actions/ninja.py
+++ b/tools/cr/cr/actions/ninja.py
@@ -12,6 +12,10 @@ _PHONY_SUFFIX = ': phony'
_LINK_SUFFIX = ': link'
+DEFAULT = cr.Config.From(
+ GOMA_DIR=os.path.expanduser('~/goma'),
+)
+
class NinjaBuilder(cr.Builder):
"""An implementation of Builder that uses ninja to do the actual build."""
@@ -21,7 +25,6 @@ class NinjaBuilder(cr.Builder):
NINJA_JOBS=10,
NINJA_PROCESSORS=4,
NINJA_BUILD_FILE=os.path.join('{CR_BUILD_DIR}', 'build.ninja'),
- GOMA_DIR=os.path.join('{GOOGLE_CODE}', 'goma'),
# Don't rename to GOMA_* or Goma will complain: "unkown GOMA_ parameter".
NINJA_GOMA_LINE='cc = {CR_GOMA_CC} $',
)
@@ -107,8 +110,10 @@ class NinjaBuilder(cr.Builder):
cls.DETECTED.Set(NINJA_BINARY=ninja_binaries[0])
goma_binaries = cr.Host.SearchPath('gomacc', [
+ '{GOMA_DIR}',
'/usr/local/google/code/goma',
- os.path.expanduser('~/goma')])
+ os.path.expanduser('~/goma')
+ ])
if goma_binaries:
cls.DETECTED.Set(CR_GOMA_DIR=os.path.dirname(goma_binaries[0]))
cls.DETECTED.AddChildren(cls.GOMA)
« 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