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

Unified Diff: tools/build.py

Issue 404333004: - Fail if toolchain is not set instead of warning always even if not necessary. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 5 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/build.py
===================================================================
--- tools/build.py (revision 38454)
+++ tools/build.py (working copy)
@@ -134,8 +134,8 @@
# If no cross compiler is specified, only try to figure one out on Linux.
if not HOST_OS in ['linux']:
- print "Unless --toolchain is used cross-building is only supported on Linux"
- return None
+ raise Exception('Unless --toolchain is used cross-building is only '
+ 'supported on Linux.')
# For ARM Linux, by default use the Linux distribution's cross-compiler.
if arch == 'arm':
@@ -368,7 +368,7 @@
filter_xcodebuild_output = False
Bill Hesse 2014/07/22 14:21:07 Should override_tools be renamed to cross_compilat
Ivan Posva 2014/07/22 14:26:13 As I think more about this, it seems to be a probl
-def BuildOneConfig(options, target, target_os, mode, arch, override_tools=True):
+def BuildOneConfig(options, target, target_os, mode, arch, override_tools):
global filter_xcodebuild_output
start_time = time.time()
os.environ['DART_BUILD_MODE'] = mode
@@ -476,7 +476,7 @@
return 1
# Then, build the runtime for the target arch.
- if BuildOneConfig(options, 'runtime', target_os, mode, arch) != 0:
+ if BuildOneConfig(options, 'runtime', target_os, mode, arch, True) != 0:
return 1
# TODO(zra): verify that no platform specific details leak into the snapshots
@@ -529,11 +529,12 @@
for target_os in options.os:
for mode in options.mode:
for arch in options.arch:
- if target in ['create_sdk'] and utils.IsCrossBuild(target_os, arch):
+ cross_build = utils.IsCrossBuild(target_os, arch)
+ if target in ['create_sdk'] and cross_build:
if BuildCrossSdk(options, target_os, mode, arch) != 0:
return 1
else:
- if BuildOneConfig(options, target, target_os, mode, arch) != 0:
+ if BuildOneConfig(options, target, target_os, mode, arch, cross_build) != 0:
Ivan Posva 2014/07/22 13:26:10 long line fixed
return 1
return 0
« 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