[libcxx-commits] [PATCH] D127987: [libc++] Don't force -O2 when building the benchmarks
Louis Dionne via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 16 10:40:43 PDT 2022
ldionne created this revision.
ldionne added a reviewer: var-const.
Herald added a subscriber: mgorny.
Herald added a project: All.
ldionne requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D127987
Files:
libcxx/benchmarks/CMakeLists.txt
Index: libcxx/benchmarks/CMakeLists.txt
===================================================================
--- libcxx/benchmarks/CMakeLists.txt
+++ libcxx/benchmarks/CMakeLists.txt
@@ -82,7 +82,7 @@
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")
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127987.437597.patch
Type: text/x-patch
Size: 809 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20220616/b6cc2f78/attachment-0001.bin>
More information about the libcxx-commits
mailing list