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

Unified Diff: tools/utils.py

Issue 189543010: - Redo cross-build detection. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: 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/utils.py
===================================================================
--- tools/utils.py (revision 33488)
+++ tools/utils.py (working copy)
@@ -213,6 +213,15 @@
'macos': os.path.join('xcodebuild'),
}
+ARCH_FAMILY = {
+ 'ia32': 'ia32',
+ 'x64': 'ia32',
+ 'arm': 'arm',
+ 'mips': 'mips',
+ 'simarm': 'ia32',
+ 'simmips': 'ia32',
+}
+
ARCH_GUESS = GuessArchitecture()
BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..'))
DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..'))
@@ -226,21 +235,17 @@
def GetBuildMode(mode):
return BUILD_MODES[mode]
+def GetArchFamily(arch):
+ return ARCH_FAMILY[arch]
+
def GetBuildConf(mode, arch, conf_os=None):
if conf_os == 'android':
return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper())
else:
# Ask for a cross build if the host and target architectures don't match.
host_arch = ARCH_GUESS
- target_arch = arch
- if target_arch == 'x64':
- target_arch = 'ia32'
- print "GetBuildConf: Rewritten %s to %s\n" % (arch, target_arch)
- if host_arch == 'x64':
- host_arch = 'ia32'
- print "GetBuildConf: Rewritten %s to %s\n" % (arch, host_arch)
cross_build = ''
- if host_arch != target_arch:
+ if GetArchFamily(host_arch) != GetArchFamily(arch):
print "GetBuildConf: Cross-build of %s on %s\n" % (arch, host_arch)
cross_build = 'X'
return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper())
« 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