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

Unified Diff: pydir/crosstest.py

Issue 892803002: Subzero: Add a --elf arg to szbuild.py and crosstest.py. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 11 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 | « no previous file | pydir/szbuild.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pydir/crosstest.py
diff --git a/pydir/crosstest.py b/pydir/crosstest.py
index 3fb205b70a6e4ce9dfb2d9c39678ad8d0f0015b2..a197bd3fc6ceadba5fe35a33e7f0d8bed18073e5 100755
--- a/pydir/crosstest.py
+++ b/pydir/crosstest.py
@@ -65,6 +65,9 @@ if __name__ == '__main__':
'from the same bitcode as the subzero object. ' +
'If 0, then compile it straight from source.' +
' Default %(default)d.')
+ argparser.add_argument('--elf', dest='elf',
+ action='store_true',
+ help='Directly generate ELF output')
args = argparser.parse_args()
nacl_root = FindBaseNaCl()
@@ -105,13 +108,15 @@ if __name__ == '__main__':
'--target=' + args.target,
'--prefix=' + args.prefix,
'-allow-uninitialized-globals',
- '-o=' + asm_sz,
- bitcode])
- shellcmd(['llvm-mc',
- '-arch=' + arch_map[args.target],
- '-filetype=obj',
- '-o=' + obj_sz,
- asm_sz])
+ '-o=' + (obj_sz if args.elf else asm_sz),
+ bitcode] +
+ (['-elf-writer'] if args.elf else []))
+ if not args.elf:
+ shellcmd(['llvm-mc',
+ '-arch=' + arch_map[args.target],
+ '-filetype=obj',
+ '-o=' + obj_sz,
+ asm_sz])
objs.append(obj_sz)
# Each original bitcode file needs to be translated by the
# LLVM toolchain and have its object file linked in. There
« no previous file with comments | « no previous file | pydir/szbuild.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698