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

Side by Side Diff: tools/utils.py

Issue 190663011: - Intel architecture rewriting needs to happen both ways. (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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 # Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 # for details. All rights reserved. Use of this source code is governed by a 2 # for details. All rights reserved. Use of this source code is governed by a
3 # BSD-style license that can be found in the LICENSE file. 3 # BSD-style license that can be found in the LICENSE file.
4 4
5 # This file contains a set of utilities functions used by other Python-based 5 # This file contains a set of utilities functions used by other Python-based
6 # scripts. 6 # scripts.
7 7
8 import commands 8 import commands
9 import os 9 import os
10 import platform 10 import platform
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
229 def GetBuildConf(mode, arch, conf_os=None): 229 def GetBuildConf(mode, arch, conf_os=None):
230 if conf_os == 'android': 230 if conf_os == 'android':
231 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) 231 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper())
232 else: 232 else:
233 # Ask for a cross build if the host and target architectures don't match. 233 # Ask for a cross build if the host and target architectures don't match.
234 host_arch = ARCH_GUESS 234 host_arch = ARCH_GUESS
235 target_arch = arch 235 target_arch = arch
236 if target_arch == 'x64': 236 if target_arch == 'x64':
237 target_arch = 'ia32' 237 target_arch = 'ia32'
238 print "GetBuildConf: Rewritten %s to %s\n" % (arch, target_arch) 238 print "GetBuildConf: Rewritten %s to %s\n" % (arch, target_arch)
239 cross_build = '' 239 if host_arch == 'x64':
240 target_arch = 'ia32'
241 print "GetBuildConf: Rewritten %s to %s\n" % (arch, host_arch)
242 cross_build = ''
240 if host_arch != target_arch: 243 if host_arch != target_arch:
241 print "GetBuildConf: Cross-build of %s on %s\n" % (arch, host_arch) 244 print "GetBuildConf: Cross-build of %s on %s\n" % (arch, host_arch)
242 cross_build = 'X' 245 cross_build = 'X'
243 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) 246 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper())
244 247
245 def GetBuildDir(host_os, target_os): 248 def GetBuildDir(host_os, target_os):
246 return BUILD_ROOT[host_os] 249 return BUILD_ROOT[host_os]
247 250
248 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): 251 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None):
249 build_root = GetBuildDir(host_os, target_os) 252 build_root = GetBuildDir(host_os, target_os)
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 os.chdir(self._working_directory) 554 os.chdir(self._working_directory)
552 555
553 def __exit__(self, *_): 556 def __exit__(self, *_):
554 print "Enter directory = ", self._old_cwd 557 print "Enter directory = ", self._old_cwd
555 os.chdir(self._old_cwd) 558 os.chdir(self._old_cwd)
556 559
557 560
558 if __name__ == "__main__": 561 if __name__ == "__main__":
559 import sys 562 import sys
560 Main(sys.argv) 563 Main(sys.argv)
OLDNEW
« 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