OLD | NEW |
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2013 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 import argparse | 6 import argparse |
7 import logging | 7 import logging |
8 import os | 8 import os |
9 import platform | 9 import platform |
10 import subprocess | 10 import subprocess |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 '%s_%s' % (host_os, pynacl.platform.GetArch()), | 58 '%s_%s' % (host_os, pynacl.platform.GetArch()), |
59 'pnacl_newlib') | 59 'pnacl_newlib') |
60 | 60 |
61 def ToolchainBuildCmd(python_executable=None, sync=False, extra_flags=[]): | 61 def ToolchainBuildCmd(python_executable=None, sync=False, extra_flags=[]): |
62 executable = [python_executable] if python_executable else [sys.executable] | 62 executable = [python_executable] if python_executable else [sys.executable] |
63 sync_flag = ['--sync'] if sync else [] | 63 sync_flag = ['--sync'] if sync else [] |
64 | 64 |
65 # The path to the script is a relative path with forward slashes so it is | 65 # The path to the script is a relative path with forward slashes so it is |
66 # interpreted properly when it uses __file__ inside cygwin | 66 # interpreted properly when it uses __file__ inside cygwin |
67 executable_args = ['toolchain_build/toolchain_build_pnacl.py', | 67 executable_args = ['toolchain_build/toolchain_build_pnacl.py', |
68 '--verbose', '--clobber', '--build-64bit-host', | 68 '--verbose', '--clobber', |
69 '--install', toolchain_install_dir] | 69 '--install', toolchain_install_dir] |
70 | 70 |
71 if args.buildbot: | 71 if args.buildbot: |
72 executable_args.append('--buildbot') | 72 executable_args.append('--buildbot') |
73 elif args.trybot: | 73 elif args.trybot: |
74 executable_args.append('--trybot') | 74 executable_args.append('--trybot') |
75 | 75 |
76 # Enabling LLVM assertions have a higher cost on Windows, particularly in the | 76 # Enabling LLVM assertions have a higher cost on Windows, particularly in the |
77 # presence of threads. So disable them on windows but leave them on elsewhere | 77 # presence of threads. So disable them on windows but leave them on elsewhere |
78 # to get the extra error checking. | 78 # to get the extra error checking. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 if args.buildbot: | 225 if args.buildbot: |
226 trybot_mode = 'false' | 226 trybot_mode = 'false' |
227 else: | 227 else: |
228 trybot_mode = 'true' | 228 trybot_mode = 'true' |
229 | 229 |
230 platform_arg = 'mode-buildbot-tc-' + arch + '-linux' | 230 platform_arg = 'mode-buildbot-tc-' + arch + '-linux' |
231 | 231 |
232 command = [bash, buildbot_shell, platform_arg, trybot_mode] | 232 command = [bash, buildbot_shell, platform_arg, trybot_mode] |
233 logging.info('Running: ' + ' '.join(command)) | 233 logging.info('Running: ' + ' '.join(command)) |
234 subprocess.check_call(command) | 234 subprocess.check_call(command) |
OLD | NEW |