| OLD | NEW |
| 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 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 if host_arch == 'x64': | 239 if host_arch == 'x64': |
| 240 target_arch = 'ia32' | 240 host_arch = 'ia32' |
| 241 print "GetBuildConf: Rewritten %s to %s\n" % (arch, host_arch) | 241 print "GetBuildConf: Rewritten %s to %s\n" % (arch, host_arch) |
| 242 cross_build = '' | 242 cross_build = '' |
| 243 if host_arch != target_arch: | 243 if host_arch != target_arch: |
| 244 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) |
| 245 cross_build = 'X' | 245 cross_build = 'X' |
| 246 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) | 246 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) |
| 247 | 247 |
| 248 def GetBuildDir(host_os, target_os): | 248 def GetBuildDir(host_os, target_os): |
| 249 return BUILD_ROOT[host_os] | 249 return BUILD_ROOT[host_os] |
| 250 | 250 |
| (...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 os.chdir(self._working_directory) | 554 os.chdir(self._working_directory) |
| 555 | 555 |
| 556 def __exit__(self, *_): | 556 def __exit__(self, *_): |
| 557 print "Enter directory = ", self._old_cwd | 557 print "Enter directory = ", self._old_cwd |
| 558 os.chdir(self._old_cwd) | 558 os.chdir(self._old_cwd) |
| 559 | 559 |
| 560 | 560 |
| 561 if __name__ == "__main__": | 561 if __name__ == "__main__": |
| 562 import sys | 562 import sys |
| 563 Main(sys.argv) | 563 Main(sys.argv) |
| OLD | NEW |