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

Unified Diff: pydir/crosstest.py

Issue 560493002: Subzero: The cross tests should use the actual Subzero runtime. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make the g++/clang++ comment correct Created 6 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_vector_ops_main.cpp ('k') | runtime/szrt.cpp » ('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 2df00f14eb01d8d1dbf04c6a3fb0775c3b48cfb0..54010c52e25b6fd7e008737d71309e69a55c9c6e 100755
--- a/pydir/crosstest.py
+++ b/pydir/crosstest.py
@@ -122,6 +122,7 @@ if __name__ == '__main__':
# failures. This behavior can be inspected by switching
# use_llc between True and False.
use_llc = False
+ pure_c = os.path.splitext(args.driver)[1] == '.c'
if not args.crosstest_bitcode:
objs.append(arg)
elif use_llc:
@@ -133,7 +134,11 @@ if __name__ == '__main__':
else:
objs.append(bitcode)
- linker = 'clang' if os.path.splitext(args.driver)[1] == '.c' else 'clang++'
+ # Use 'clang szrt.c' -or- 'clang++ szrt.cpp'
+ objs.append((
+ '{root}/toolchain_build/src/subzero/runtime/szrt.{ext}'
+ ).format(root=nacl_root, ext='c' if pure_c else 'cpp'))
+ linker = 'clang' if pure_c else 'clang++'
shellcmd([linker, '-g', '-m32', args.driver] +
objs +
['-lm', '-lpthread', '-o', os.path.join(args.dir, args.output)])
« no previous file with comments | « crosstest/test_vector_ops_main.cpp ('k') | runtime/szrt.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698