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

Unified Diff: tools/build.py

Issue 12726011: Enables cross-compilation of the VM for ARM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 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 | « runtime/vm/vm.gypi ('k') | tools/gyp/configurations_make.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/build.py
===================================================================
--- tools/build.py (revision 21755)
+++ tools/build.py (working copy)
@@ -15,11 +15,23 @@
HOST_OS = utils.GuessOS()
HOST_CPUS = utils.GuessCpus()
-armcompilerlocation = '/opt/codesourcery/arm-2009q1'
SCRIPT_DIR = os.path.dirname(sys.argv[0])
DART_ROOT = os.path.realpath(os.path.join(SCRIPT_DIR, '..'))
THIRD_PARTY_ROOT = os.path.join(DART_ROOT, 'third_party')
+arm_cc_error = """
+Couldn't find the arm cross compiler.
+To make sure that you have the arm cross compilation tools installed, run:
+
+$ wget http://src.chromium.org/chrome/trunk/src/build/install-build-deps.sh
+OR
+$ svn co http://src.chromium.org/chrome/trunk/src/build; cd build
+Then,
+$ chmod u+x install-build-deps.sh
+$ ./install-build-deps.sh --arm --no-chromeos-fonts
+"""
+DEFAULT_ARM_CROSS_COMPILER_PATH = '/usr'
+
def BuildOptions():
result = optparse.OptionParser()
result.add_option("-m", "--mode",
@@ -107,14 +119,14 @@
def SetTools(arch, toolchainprefix):
toolsOverride = None
if arch == 'arm' and toolchainprefix == None:
- toolchainprefix = armcompilerlocation + "/bin/arm-none-linux-gnueabi"
+ toolchainprefix = DEFAULT_ARM_CROSS_COMPILER_PATH + "/bin/arm-linux-gnueabi"
if toolchainprefix:
toolsOverride = {
- "CC" : toolchainprefix + "-gcc",
- "CXX" : toolchainprefix + "-g++",
- "AR" : toolchainprefix + "-ar",
- "LINK": toolchainprefix + "-g++",
- "NM" : toolchainprefix + "-nm",
+ "CC.target" : toolchainprefix + "-gcc",
+ "CXX.target" : toolchainprefix + "-g++",
+ "AR.target" : toolchainprefix + "-ar",
+ "LINK.target": toolchainprefix + "-g++",
+ "NM.target" : toolchainprefix + "-nm",
}
return toolsOverride
@@ -413,7 +425,14 @@
args.append( k + "=" + v)
if printToolOverrides:
print k + " = " + v
+ if not os.path.isfile(toolsOverride['CC.target']):
+ if arch == 'arm':
+ print arm_cc_error
+ else:
+ print "Couldn't find compiler: %s" % toolsOverride['CC.target']
+ return 1
+
print ' '.join(args)
process = None
if filter_xcodebuild_output:
« no previous file with comments | « runtime/vm/vm.gypi ('k') | tools/gyp/configurations_make.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698