diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt --- a/libcxx/CMakeLists.txt +++ b/libcxx/CMakeLists.txt @@ -514,11 +514,11 @@ # Required flags ============================================================== function(cxx_add_basic_build_flags target) - # Require C++17 for all targets. C++17 is needed to use aligned allocation - # in the dylib. + # Require C++20 for all targets. C++17 is needed to use aligned allocation + # in the dylib. C++20 is needed to use char8_t. set_target_properties(${target} PROPERTIES - CXX_STANDARD 17 - CXX_STANDARD_REQUIRED YES + CXX_STANDARD 20 + CXX_STANDARD_REQUIRED NO CXX_EXTENSIONS NO) # When building the dylib, don't warn for unavailable aligned allocation diff --git a/libcxxabi/src/CMakeLists.txt b/libcxxabi/src/CMakeLists.txt --- a/libcxxabi/src/CMakeLists.txt +++ b/libcxxabi/src/CMakeLists.txt @@ -174,9 +174,9 @@ CXX_EXTENSIONS OFF CXX_STANDARD - 17 + 20 CXX_STANDARD_REQUIRED - ON + OFF COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}" LINK_FLAGS @@ -241,9 +241,9 @@ CXX_EXTENSIONS OFF CXX_STANDARD - 17 + 20 CXX_STANDARD_REQUIRED - ON + OFF COMPILE_FLAGS "${LIBCXXABI_COMPILE_FLAGS}" LINK_FLAGS