Skip to content

Commit 3ca520f

Browse files
committed
[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
1 parent 194897e commit 3ca520f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

libcxx/benchmarks/CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ set(BENCHMARK_NATIVE_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-native)
8282

8383
add_library( cxx-benchmarks-flags INTERFACE)
8484
target_compile_features( cxx-benchmarks-flags INTERFACE cxx_std_20)
85-
target_compile_options( cxx-benchmarks-flags INTERFACE -O2 -fsized-deallocation)
86-
target_include_directories(cxx-benchmarks-flags INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"
85+
target_compile_options( cxx-benchmarks-flags INTERFACE -O2 -fsized-deallocation -nostdinc++)
86+
target_include_directories(cxx-benchmarks-flags INTERFACE "${LIBCXX_GENERATED_INCLUDE_DIR}"
87+
INTERFACE "${BENCHMARK_LIBCXX_INSTALL}/include"
8788
INTERFACE "${LIBCXX_SOURCE_DIR}/test/support")
8889

8990
add_library( cxx-benchmarks-flags-native INTERFACE)

0 commit comments

Comments
 (0)