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

Unified Diff: pydir/crosstest.py

Issue 1359193003: Subzero. Enables (most) crosstests for ARM32. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Addresses comments. Created 5 years, 3 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/test_icmp_main.cpp ('k') | src/IceInstARM32.h » ('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 4846815971c05275487b79b6aa28cd7562c31a4e..f01bd5927eea9d7c2640b79576ce52e84c869ec7 100755
--- a/pydir/crosstest.py
+++ b/pydir/crosstest.py
@@ -122,7 +122,8 @@ def main():
bitcode_nonfinal = os.path.join(args.dir, base + '.' + key + '.bc')
bitcode = os.path.join(args.dir, base + '.' + key + '.pnacl.ll')
shellcmd(['{bin}/pnacl-clang'.format(bin=bindir),
- ('-O2' if args.clang_opt else '-O0'), '-c', arg,
+ ('-O2' if args.clang_opt else '-O0'),
+ ('-DARM32' if args.target == 'arm32' else ''), '-c', arg,
'-o', bitcode_nonfinal])
shellcmd(['{bin}/pnacl-opt'.format(bin=bindir),
'-pnacl-abi-simplify-preopt',
@@ -185,12 +186,16 @@ def main():
# configuration. In order to run the crosstests we play nasty, dangerous
# tricks with the stack pointer.
needs_stack_hack = (args.target == 'x8664')
- stack_hack_params = []
+ target_params = []
if needs_stack_hack:
shellcmd('{bin}/clang -g -o stack_hack.x8664.{key}.o -c '
'stack_hack.x8664.c'.format(bin=bindir, key=key))
- stack_hack_params.append('-DX8664_STACK_HACK')
- stack_hack_params.append('stack_hack.x8664.{key}.o'.format(key=key))
+ target_params.append('-DX8664_STACK_HACK')
+ target_params.append('stack_hack.x8664.{key}.o'.format(key=key))
+
+ if args.target == 'arm32':
+ target_params.append('-DARM32')
+ target_params.append('-static')
# Set compiler to clang, clang++, pnacl-clang, or pnacl-clang++.
compiler = '{bin}/{prefix}{cc}'.format(
@@ -204,7 +209,7 @@ def main():
'-lm', '-lpthread',
'-Wl,--defsym=__Sz_AbsoluteZero=0'] +
target_info.cross_headers)
- shellcmd([compiler] + stack_hack_params + [args.driver] + objs +
+ shellcmd([compiler] + target_params + [args.driver] + objs +
['-o', os.path.join(args.dir, args.output)] + sb_native_args)
if __name__ == '__main__':
« no previous file with comments | « crosstest/test_icmp_main.cpp ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698