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

Side by Side Diff: pydir/build-pnacl-ir.py

Issue 317963002: Make py import not assume dir is "pnacl-subzero". Avoid autovect in crosstest. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: no need for disable-opt Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « llvm2iceinsts.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python2 1 #!/usr/bin/env python2
2 2
3 import argparse 3 import argparse
4 import os 4 import os
5 import sys 5 import sys
6 import tempfile 6 import tempfile
7 from utils import shellcmd 7 from utils import shellcmd
8 8
9 if __name__ == '__main__': 9 if __name__ == '__main__':
10 argparser = argparse.ArgumentParser() 10 argparser = argparse.ArgumentParser()
(...skipping 22 matching lines...) Expand all
33 opt_path = os.path.join(toolchain_path, 'host_x86_64', 'bin', 'opt') 33 opt_path = os.path.join(toolchain_path, 'host_x86_64', 'bin', 'opt')
34 34
35 tempdir = tempfile.mkdtemp() 35 tempdir = tempfile.mkdtemp()
36 36
37 for cname in args.cfile: 37 for cname in args.cfile:
38 basename = os.path.splitext(cname)[0] 38 basename = os.path.splitext(cname)[0]
39 llname = os.path.join(tempdir, basename + '.ll') 39 llname = os.path.join(tempdir, basename + '.ll')
40 pnaclname = basename + '.pnacl.ll' 40 pnaclname = basename + '.pnacl.ll'
41 pnaclname = os.path.join(args.dir, pnaclname) 41 pnaclname = os.path.join(args.dir, pnaclname)
42 42
43 shellcmd(clang_path + ' -I{0} -c {1} -o {2}'.format( 43 shellcmd(clang_path + ' -O2 -I{0} -c {1} -o {2}'.format(
44 includes_path, cname, llname)) 44 includes_path, cname, llname))
45 shellcmd(opt_path + 45 shellcmd(opt_path +
46 ' -O2 -pnacl-abi-simplify-preopt -pnacl-abi-simplify-postopt' + 46 ' -pnacl-abi-simplify-preopt -pnacl-abi-simplify-postopt' +
47 ('' if args.disable_verify else 47 ('' if args.disable_verify else
48 ' -verify-pnaclabi-module -verify-pnaclabi-functions') + 48 ' -verify-pnaclabi-module -verify-pnaclabi-functions') +
49 ' -pnaclabi-allow-debug-metadata -disable-simplify-libcalls' 49 ' -pnaclabi-allow-debug-metadata -disable-simplify-libcalls'
50 ' {0} -S -o {1}'.format(llname, pnaclname)) 50 ' {0} -S -o {1}'.format(llname, pnaclname))
OLDNEW
« no previous file with comments | « llvm2iceinsts.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698