Commit 47a0f39d authored by Andreas Fried's avatar Andreas Fried Committed by Manuel Mohr
Browse files

Add option to to actually produce amd64 code.

parent d5e8be60
......@@ -79,6 +79,8 @@ parser.add_argument("--fortran-compiler-args", metavar="FFLAGS", default=[], act
help="Append FFLAGS to build benchmark programs for Fortran compiler, default empty")
parser.add_argument("--cpp-compiler-args", metavar="CPPFLAGS", default=[], action="append",
help="Append CPPFLAGS to build benchmark programs for C++ compiler, default march=native")
parser.add_argument("--force-64", action="store_true", default=False,
help="Actually produce amd64 code (experimental cparser backend")
parser.add_argument(dest="benchmarks", metavar="BENCHMARK", nargs="*",
help="only run benchmark BENCHMARK")
......@@ -364,7 +366,8 @@ def check_options(options):
# Convenience: always compile to 32-bit x86 code with cparser
target_x86 = options.target_architecture == "i686" or options.target_architecture == "x86_64"
is_cparser = "cparser" in options.c_compiler
if HOST_ARCH == "x86_64" and is_cparser and target_x86 and not ("-m32" in options.c_compiler_args):
if HOST_ARCH == "x86_64" and is_cparser and target_x86 and \
not ("-m32" in options.c_compiler_args) and not options.force_64:
options.target_architecture = "i686"
if options.c_compiler_args == []:
options.c_compiler_args = ["-march=native"]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment