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

Unified Diff: frog/frog.py

Issue 8462005: Build frog and frogsh at the top-level. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: '' Created 9 years, 1 month 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 | « frog/dart-frog.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/frog.py
===================================================================
--- frog/frog.py (revision 1187)
+++ frog/frog.py (working copy)
@@ -58,7 +58,23 @@
dart = join(os.pardir, dart)
return dart
+def GetD8():
+ system = utils.GuessOS()
+ d8 = join(utils.GetBuildRoot(system, 'release', 'ia32'), 'd8')
+ if exists(d8): return d8
+ # Try at the top level
+ d8 = join(os.pardir, d8)
+ if exists(d8): return d8
+ # Try a debug version
+ d8 = join(utils.GetBuildRoot(system, 'debug', 'ia32'), 'd8')
+ if exists(d8): return d8
+ # Try at the top level
+ d8 = join(os.pardir, d8)
+ return d8
+
+D8 = GetD8()
+
def execute(cmd):
"""Execute a command in a subprocess. """
try:
@@ -134,8 +150,12 @@
return 1
if subprocess.call("node --help >/dev/null 2>&1", shell=True):
- print "Executing node failed. See frog/README.txt for instructions"
- return 1
+ if not exists(D8):
+ print "No engine available for running JS code."
+ print "See frog/README.txt for instructions."
+ return 1
+ elif 'node' in options.js_cmd:
+ options.js_cmd = D8
return compileAndRun(options, dartArgs, dart)
« no previous file with comments | « frog/dart-frog.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698