Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Unified Diff: pydir/run-pnacl-sz.py

Issue 1085733002: Subzero: Auto-detect cmake versus autoconf LLVM build. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix the sb build libs Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « crosstest/lit.cfg ('k') | tests_lit/lit.cfg » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/run-pnacl-sz.py
diff --git a/pydir/run-pnacl-sz.py b/pydir/run-pnacl-sz.py
index 2c0b03c08bdcaa59ef4884078fe0d8257f254444..2d86a35d863a9c0a554801472036df88885c61b7 100755
--- a/pydir/run-pnacl-sz.py
+++ b/pydir/run-pnacl-sz.py
@@ -40,13 +40,10 @@ def main():
argparser.add_argument(
'--pnacl-sz', required=False, default='./pnacl-sz', metavar='PNACL-SZ',
help="Subzero translator 'pnacl-sz'")
- argparser.add_argument('--llvm-bin-path', required=False,
- default=None, metavar='LLVM_BIN_PATH',
- help='Path to LLVM executables ' +
- '(for building PEXE files)')
- argparser.add_argument('--binutils-bin-path', required=False,
- default=None, metavar='BINUTILS_BIN_PATH',
- help='Path to Binutils executables')
+ argparser.add_argument('--pnacl-bin-path', required=False,
+ default=None, metavar='PNACL_BIN_PATH',
+ help='Path to LLVM & Binutils executables ' +
+ '(e.g. for building PEXE files)')
argparser.add_argument('--assemble', required=False,
action='store_true',
help='Assemble the output')
@@ -67,8 +64,7 @@ def main():
help='Remaining arguments are passed to pnacl-sz')
args = argparser.parse_args()
- llvm_bin_path = args.llvm_bin_path
- binutils_bin_path = args.binutils_bin_path
+ pnacl_bin_path = args.pnacl_bin_path
llfile = args.input
if args.llvm and args.llvm_source:
@@ -80,8 +76,8 @@ def main():
cmd = []
if not args.llvm_source:
- cmd = [os.path.join(llvm_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
- os.path.join(llvm_bin_path, 'pnacl-freeze')]
+ cmd = [os.path.join(pnacl_bin_path, 'llvm-as'), llfile, '-o', '-', '|',
+ os.path.join(pnacl_bin_path, 'pnacl-freeze')]
if not args.no_local_syms:
cmd += ['--allow-local-symbol-tables']
cmd += ['|']
@@ -111,7 +107,7 @@ def main():
asm_temp = tempfile.NamedTemporaryFile(delete=False)
asm_temp.close()
if args.assemble and args.filetype != 'obj':
- cmd += ['|', os.path.join(llvm_bin_path, 'llvm-mc'),
+ cmd += ['|', os.path.join(pnacl_bin_path, 'llvm-mc'),
# TODO(stichnot): -triple=i686-nacl should be used for a
# sandboxing test. This means there should be an args.sandbox
# argument that also gets passed through to pnacl-sz.
@@ -121,7 +117,7 @@ def main():
cmd += ['-o', asm_temp.name]
if args.disassemble:
# Show wide instruction encodings, diassemble, and show relocs.
- cmd += (['&&', os.path.join(binutils_bin_path, 'le32-nacl-objdump')] +
+ cmd += (['&&', os.path.join(pnacl_bin_path, 'le32-nacl-objdump')] +
args.dis_flags +
['-w', '-d', '-r', '-Mintel', asm_temp.name])
« no previous file with comments | « crosstest/lit.cfg ('k') | tests_lit/lit.cfg » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698