From f881776175e97f7667ad2d32cfea0ba6f4254181 Mon Sep 17 00:00:00 2001 From: Mark de Wever Date: Thu, 23 Sep 2021 12:15:02 -0400 Subject: [PATCH] [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 --- libcxx/CMakeLists.txt | 2 +- libcxx/benchmarks/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt index 924a9f1..6ab44e5 100644 --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -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 diff --git a/libcxx/benchmarks/CMakeLists.txt b/libcxx/benchmarks/CMakeLists.txt index 8d83ecd..cad8808 100644 --- a/libcxx/benchmarks/CMakeLists.txt +++ b/libcxx/benchmarks/CMakeLists.txt @@ -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") -- 2.7.4