forked from OSchip/llvm-project
[libc++] Require a C++20 capable compiler.
This enforces libcxx and its benchmarks are compiled by a C++20 capable compiler. Based on review comments in D103413. Differential Revision: https://reviews.llvm.org/D110338
This commit is contained in:
parent
09e71c367a
commit
f881776175
|
@ -537,7 +537,7 @@ function(cxx_add_basic_build_flags target)
|
|||
# in the dylib. C++20 is needed to use char8_t.
|
||||
set_target_properties(${target} PROPERTIES
|
||||
CXX_STANDARD 20
|
||||
CXX_STANDARD_REQUIRED NO
|
||||
CXX_STANDARD_REQUIRED YES
|
||||
CXX_EXTENSIONS NO)
|
||||
|
||||
# When building the dylib, don't warn for unavailable aligned allocation
|
||||
|
|
|
@ -81,7 +81,7 @@ set(BENCHMARK_LIBCXX_INSTALL ${CMAKE_CURRENT_BINARY_DIR}/benchmark-libcxx)
|
|||
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_17)
|
||||
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"
|
||||
INTERFACE "${LIBCXX_SOURCE_DIR}/test/support")
|
||||
|
|
Loading…
Reference in New Issue