From 15ea0af6877508421b728f6603b70b63a868fd69 Mon Sep 17 00:00:00 2001 From: Matt Pharr Date: Sat, 5 May 2012 15:13:38 -0700 Subject: [PATCH] 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. --- run_tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/run_tests.py b/run_tests.py index 79465267..6bfadf05 100755 --- a/run_tests.py +++ b/run_tests.py @@ -32,6 +32,8 @@ parser.add_option("-r", "--random-shuffle", dest="random", help="Randomly order default=False, action="store_true") parser.add_option("-g", "--generics-include", dest="include_file", help="Filename for header implementing functions for generics", 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', help='Set compilation target (sse2, sse2-x2, sse4, sse4-x2, avx, avx-x2, generic-4, generic-8, generic-16, generic-32)', default="sse4") @@ -57,6 +59,10 @@ if not is_windows: else: ispc_exe = "../Release/ispc.exe" +ispc_exe += " " + options.ispc_flags + +print ispc_exe + is_generic_target = (options.target.find("generic-") != -1 and options.target != "generic-1") if is_generic_target and options.include_file == None: