The optimization level used when building the benchmarks should
match the optimization level of the current build. Otherwise, we
can end up mixing an -O3 or -O0 optimized dylib with benchmarks
built with -O2, which is really misleading.
Differential Revision: https://reviews.llvm.org/D127987
add_library( cxx-benchmarks-flags INTERFACE)
target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_20)
-target_compile_options( cxx-benchmarks-flags INTERFACE -O2 -fsized-deallocation -nostdinc++)
+target_compile_options( cxx-benchmarks-flags INTERFACE -fsized-deallocation -nostdinc++)
target_include_directories(cxx-benchmarks-flags INTERFACE "${LIBCXX_GENERATED_INCLUDE_DIR}"
INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"
INTERFACE "${LIBCXX_SOURCE_DIR}/test/support")