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 contextlib | 9 import contextlib |
10 import datetime | 10 import datetime |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
287 (target_os != GuessOS())) | 287 (target_os != GuessOS())) |
288 | 288 |
289 def GetBuildConf(mode, arch, conf_os=None): | 289 def GetBuildConf(mode, arch, conf_os=None): |
290 if conf_os == 'android': | 290 if conf_os == 'android': |
291 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) | 291 return '%s%s%s' % (GetBuildMode(mode), conf_os.title(), arch.upper()) |
292 else: | 292 else: |
293 # Ask for a cross build if the host and target architectures don't match. | 293 # Ask for a cross build if the host and target architectures don't match. |
294 host_arch = ARCH_GUESS | 294 host_arch = ARCH_GUESS |
295 cross_build = '' | 295 cross_build = '' |
296 if GetArchFamily(host_arch) != GetArchFamily(arch): | 296 if GetArchFamily(host_arch) != GetArchFamily(arch): |
297 print "GetBuildConf: Cross-build of %s on %s\n" % (arch, host_arch) | |
298 cross_build = 'X' | 297 cross_build = 'X' |
299 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) | 298 return '%s%s%s' % (GetBuildMode(mode), cross_build, arch.upper()) |
300 | 299 |
301 def GetBuildDir(host_os): | 300 def GetBuildDir(host_os): |
302 return BUILD_ROOT[host_os] | 301 return BUILD_ROOT[host_os] |
303 | 302 |
304 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): | 303 def GetBuildRoot(host_os, mode=None, arch=None, target_os=None): |
305 build_root = GetBuildDir(host_os) | 304 build_root = GetBuildDir(host_os) |
306 if mode: | 305 if mode: |
307 build_root = os.path.join(build_root, GetBuildConf(mode, arch, target_os)) | 306 build_root = os.path.join(build_root, GetBuildConf(mode, arch, target_os)) |
(...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 return contextlib.nested(WindowsCoreDumpEnabler(), | 1043 return contextlib.nested(WindowsCoreDumpEnabler(), |
1045 WindowsCoreDumpArchiver()) | 1044 WindowsCoreDumpArchiver()) |
1046 else: | 1045 else: |
1047 # We don't have support for MacOS yet. | 1046 # We don't have support for MacOS yet. |
1048 assert osname == 'macos' | 1047 assert osname == 'macos' |
1049 return NooptCoreDumpArchiver() | 1048 return NooptCoreDumpArchiver() |
1050 | 1049 |
1051 if __name__ == "__main__": | 1050 if __name__ == "__main__": |
1052 import sys | 1051 import sys |
1053 Main() | 1052 Main() |
OLD | NEW |