Add a cmake flag to the benchmarks: SWIFT_BENCHMARK_EXTRA_FLAGS.

We used to have this cmake flag but it seems to have disappeared. Building the
benchmarks with different swiftc flags is central to performance analysis, so
I'm not sure how people were getting this done.
This commit is contained in:
Andrew Trick
2018-03-05 10:16:31 -08:00
parent e66fd1ad0c
commit 3715464c05
2 changed files with 10 additions and 4 deletions

View File

@@ -319,6 +319,7 @@ function (swift_benchmark_compile_archopts)
${extra_options}
"-parse-as-library"
${bench_flags}
${SWIFT_BENCHMARK_EXTRA_FLAGS}
"-module-name" "${module_name}"
"-emit-module-path" "${swiftmodule}"
"-I" "${objdir}"
@@ -336,6 +337,7 @@ function (swift_benchmark_compile_archopts)
${common_swift4_options}
"-parse-as-library"
${bench_flags}
${SWIFT_BENCHMARK_EXTRA_FLAGS}
"-module-name" "${module_name}"
"-I" "${objdir}"
"-emit-sib"
@@ -363,7 +365,7 @@ function (swift_benchmark_compile_archopts)
SOURCE_DIR "${srcdir}"
OBJECT_DIR "${objdir}"
SOURCES ${${module_name}_sources}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags} ${SWIFT_BENCHMARK_EXTRA_FLAGS}
DEPENDS ${bench_library_objects} ${stdlib_dependencies})
precondition(objfile_out)
list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
@@ -381,7 +383,7 @@ function (swift_benchmark_compile_archopts)
SOURCE_DIR "${srcdir}"
OBJECT_DIR "${objdir}"
SOURCES ${${module_name}_sources}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags} ${SWIFT_BENCHMARK_EXTRA_FLAGS}
DEPENDS ${bench_library_objects} ${stdlib_dependencies})
precondition(objfiles_out)
list(APPEND SWIFT_BENCH_OBJFILES ${objfiles_out})
@@ -399,7 +401,7 @@ function (swift_benchmark_compile_archopts)
SOURCE_DIR "${srcdir}"
OBJECT_DIR "${objdir}"
SOURCES ${${module_name}_sources}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags} ${SWIFT_BENCHMARK_EXTRA_FLAGS}
DEPENDS ${bench_library_objects} ${stdlib_dependencies})
precondition(objfile_out)
list(APPEND SWIFT_BENCH_OBJFILES "${objfile_out}")
@@ -417,7 +419,7 @@ function (swift_benchmark_compile_archopts)
SOURCE_DIR "${srcdir}"
OBJECT_DIR "${objdir}"
SOURCES ${${module_name}_sources}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags}
LIBRARY_FLAGS ${common_swift4_options} ${bench_flags} ${SWIFT_BENCHMARK_EXTRA_FLAGS}
DEPENDS ${bench_library_objects} ${stdlib_dependencies})
precondition(objfiles_out)
list(APPEND SWIFT_BENCH_OBJFILES ${objfiles_out})