| 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 """Runnables for toolchain_build_pnacl.py | 6 """Runnables for toolchain_build_pnacl.py |
| 7 """ | 7 """ |
| 8 | 8 |
| 9 import base64 | 9 import base64 |
| 10 import os | 10 import os |
| 11 import shutil | 11 import shutil |
| 12 import stat | 12 import stat |
| 13 import subprocess | 13 import subprocess |
| 14 import sys | 14 import sys |
| 15 | 15 |
| 16 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) | 16 sys.path.append(os.path.join(os.path.dirname(__file__), '..')) |
| 17 import pynacl.file_tools | 17 import pynacl.file_tools |
| 18 import pynacl.repo_tools | 18 import pynacl.repo_tools |
| 19 | 19 |
| 20 | 20 |
| 21 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) | 21 SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__)) |
| 22 NACL_DIR = os.path.dirname(SCRIPT_DIR) | 22 NACL_DIR = os.path.dirname(SCRIPT_DIR) |
| 23 | 23 |
| 24 # User-facing tools | 24 # User-facing tools |
| 25 DRIVER_TOOLS = ['pnacl-' + tool + '.py' for tool in | 25 DRIVER_TOOLS = ['pnacl-' + tool + '.py' for tool in |
| 26 ('abicheck', 'ar', 'as', 'clang', 'clang++', 'compress', | 26 ('abicheck', 'ar', 'as', 'clang', 'clang++', 'compress', |
| 27 'dis', 'driver', 'finalize', 'ld', 'llc', 'nm', 'opt', | 27 'dis', 'driver', 'finalize', 'ld', 'nm', 'opt', |
| 28 'ranlib', 'readelf', 'strip', 'translate')] | 28 'ranlib', 'readelf', 'strip', 'translate')] |
| 29 # Utilities used by the driver | 29 # Utilities used by the driver |
| 30 DRIVER_UTILS = [name + '.py' for name in | 30 DRIVER_UTILS = [name + '.py' for name in |
| 31 ('artools', 'driver_env', 'driver_log', 'driver_temps', | 31 ('artools', 'driver_env', 'driver_log', 'driver_temps', |
| 32 'driver_tools', 'elftools', 'filetype', 'ldtools', | 32 'driver_tools', 'elftools', 'filetype', 'ldtools', |
| 33 'loader', 'nativeld', 'pathtools', 'shelltools')] | 33 'loader', 'nativeld', 'pathtools', 'shelltools')] |
| 34 | 34 |
| 35 def InstallDriverScripts(logger, subst, srcdir, dstdir, host_windows=False, | 35 def InstallDriverScripts(logger, subst, srcdir, dstdir, host_windows=False, |
| 36 host_64bit=False, extra_config=[]): | 36 host_64bit=False, extra_config=[]): |
| 37 srcdir = subst.SubstituteAbsPaths(srcdir) | 37 srcdir = subst.SubstituteAbsPaths(srcdir) |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 url, rev = pynacl.repo_tools.GitRevInfo(NACL_DIR) | 117 url, rev = pynacl.repo_tools.GitRevInfo(NACL_DIR) |
| 118 repotype = 'GIT' | 118 repotype = 'GIT' |
| 119 except subprocess.CalledProcessError: | 119 except subprocess.CalledProcessError: |
| 120 url, rev = pynacl.repo_tools.SvnRevInfo(NACL_DIR) | 120 url, rev = pynacl.repo_tools.SvnRevInfo(NACL_DIR) |
| 121 repotype = 'SVN' | 121 repotype = 'SVN' |
| 122 print >> f, '[%s] %s: %s' % (repotype, url, rev) | 122 print >> f, '[%s] %s: %s' % (repotype, url, rev) |
| 123 | 123 |
| 124 for name, revision in revisions.iteritems(): | 124 for name, revision in revisions.iteritems(): |
| 125 repo = base_url + repos[name] | 125 repo = base_url + repos[name] |
| 126 print >> f, '[GIT] %s: %s' % (repo, revision) | 126 print >> f, '[GIT] %s: %s' % (repo, revision) |
| OLD | NEW |