[libcxx-commits] [libcxx] f881776 - [libc++] Require a C++20 capable compiler.
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Fri Sep 24 08:38:32 PDT 2021
Author: Mark de Wever
Date: 2021-09-24T11:38:26-04:00
New Revision: f881776175e97f7667ad2d32cfea0ba6f4254181
URL: https://github.com/llvm/llvm-project/commit/f881776175e97f7667ad2d32cfea0ba6f4254181
DIFF: https://github.com/llvm/llvm-project/commit/f881776175e97f7667ad2d32cfea0ba6f4254181.diff
LOG: [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
Added:
Modified:
libcxx/CMakeLists.txt
libcxx/benchmarks/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index 924a9f191178f..6ab44e5785108 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 8d83ecdfc9b9d..cad880858a785 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")
More information about the libcxx-commits
mailing list