Add -f option to run_tests.py

This allows providing additional command-line arguments to ispc,
e.g. to force compilation with -O1, -g, etc.
This commit is contained in:
Matt Pharr
2012-05-05 15:13:38 -07:00
parent ee7e367981
commit 15ea0af687

View File

@@ -32,6 +32,8 @@ parser.add_option("-r", "--random-shuffle", dest="random", help="Randomly order
default=False, action="store_true") default=False, action="store_true")
parser.add_option("-g", "--generics-include", dest="include_file", help="Filename for header implementing functions for generics", parser.add_option("-g", "--generics-include", dest="include_file", help="Filename for header implementing functions for generics",
default=None) default=None)
parser.add_option("-f", "--ispc-flags", dest="ispc_flags", help="Additional flags for ispc (-g, -O1, ...)",
default="")
parser.add_option('-t', '--target', dest='target', parser.add_option('-t', '--target', dest='target',
help='Set compilation target (sse2, sse2-x2, sse4, sse4-x2, avx, avx-x2, generic-4, generic-8, generic-16, generic-32)', help='Set compilation target (sse2, sse2-x2, sse4, sse4-x2, avx, avx-x2, generic-4, generic-8, generic-16, generic-32)',
default="sse4") default="sse4")
@@ -57,6 +59,10 @@ if not is_windows:
else: else:
ispc_exe = "../Release/ispc.exe" ispc_exe = "../Release/ispc.exe"
ispc_exe += " " + options.ispc_flags
print ispc_exe
is_generic_target = (options.target.find("generic-") != -1 and is_generic_target = (options.target.find("generic-") != -1 and
options.target != "generic-1") options.target != "generic-1")
if is_generic_target and options.include_file == None: if is_generic_target and options.include_file == None: