summaryrefslogtreecommitdiff
path: root/libcxx/benchmarks
diff options
context:
space:
mode:
authorMark de Wever <koraq@xs4all.nl>2021-11-08 18:58:18 +0100
committerMark de Wever <koraq@xs4all.nl>2021-11-09 18:57:44 +0100
commit3ca520f19f430e38ac7fa82591141305a2679234 (patch)
treec5b44297048b08223ec73b6a744a96ba8d5fa826 /libcxx/benchmarks
parent194897eccfdd3c0b83ea47586c93bf95976d356f (diff)
downloadllvm-3ca520f19f430e38ac7fa82591141305a2679234.tar.gz
[libc++][cmake] Improves benchmark build.
The CMake dependencies don't properly list the libc++ headers. When a libc++ header is modified the affected benchmarks aren't rebuild. This makes testing benchmarks tricky and may cause accidentally not using the latest modifications during testing. This change causes CMake to determine the proper dependencies. This shouldn't affect the CI build. Reviewed By: #libc, ldionne Differential Revision: https://reviews.llvm.org/D113419
Diffstat (limited to 'libcxx/benchmarks')
-rw-r--r--libcxx/benchmarks/CMakeLists.txt5
1 files changed, 3 insertions, 2 deletions
diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt
index cad880858a78..67e643cf8608 100644
--- a/libcxx/benchmarks/CMakeLists.txt
+++ b/libcxx/benchmarks/CMakeLists.txt
@@ -82,8 +82,9 @@ set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native)
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)
-target_include_directories(cxx-benchmarks-flags INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"
+target_compile_options( cxx-benchmarks-flags INTERFACE -O2 -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")
add_library( cxx-benchmarks-flags-native INTERFACE)