| 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 213     gsutil = 'e:\\\\b\\build\\scripts\\slave\\gsutil' | 213     gsutil = 'e:\\\\b\\build\\scripts\\slave\\gsutil' | 
| 214   return gsutil | 214   return gsutil | 
| 215 | 215 | 
| 216 def GetBuildMode(mode): | 216 def GetBuildMode(mode): | 
| 217   return BUILD_MODES[mode] | 217   return BUILD_MODES[mode] | 
| 218 | 218 | 
| 219 def GetBuildConf(mode, arch, conf_os=None): | 219 def GetBuildConf(mode, arch, conf_os=None): | 
| 220   if conf_os == 'android': | 220   if conf_os == 'android': | 
| 221     return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) | 221     return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) | 
| 222   else: | 222   else: | 
| 223     return '%s%s' % (GetBuildMode(mode), arch.upper()) | 223     # Ask for a cross build if the host and target architectures don't match. | 
|  | 224     host_arch = ARCH_GUESS | 
|  | 225     target_arch = arch | 
|  | 226     if target_arch == 'x64': | 
|  | 227       target_arch = 'ia32' | 
|  | 228     cross_build = '' | 
|  | 229     if host_arch != target_arch: | 
|  | 230       cross_build = 'X' | 
|  | 231     return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) | 
| 224 | 232 | 
| 225 ARCH_GUESS = GuessArchitecture() | 233 ARCH_GUESS = GuessArchitecture() | 
| 226 BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..')) | 234 BASE_DIR = os.path.abspath(os.path.join(os.curdir, '..')) | 
| 227 DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..')) | 235 DART_DIR = os.path.abspath(os.path.join(__file__, '..', '..')) | 
| 228 | 236 | 
| 229 | 237 | 
| 230 def GetBuildDir(host_os, target_os): | 238 def GetBuildDir(host_os, target_os): | 
| 231   return BUILD_ROOT[host_os] | 239   return BUILD_ROOT[host_os] | 
| 232 | 240 | 
| 233 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): | 241 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): | 
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 534     os.chdir(self._working_directory) | 542     os.chdir(self._working_directory) | 
| 535 | 543 | 
| 536   def __exit__(self, *_): | 544   def __exit__(self, *_): | 
| 537     print "Enter directory = ", self._old_cwd | 545     print "Enter directory = ", self._old_cwd | 
| 538     os.chdir(self._old_cwd) | 546     os.chdir(self._old_cwd) | 
| 539 | 547 | 
| 540 | 548 | 
| 541 if __name__ == "__main__": | 549 if __name__ == "__main__": | 
| 542   import sys | 550   import sys | 
| 543   Main(sys.argv) | 551   Main(sys.argv) | 
| OLD | NEW | 
|---|