[llvm-branch-commits] [libcxxabi] 3b62506 - [libc++] [libc++abi] Use C++20 standard.
Marek Kurdej via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Sun Nov 22 07:01:55 PST 2020
Author: Marek Kurdej
Date: 2020-11-22T15:57:25+01:00
New Revision: 3b625060fc91598d28196e559196bfc7b9a929f9
URL: https://github.com/llvm/llvm-project/commit/3b625060fc91598d28196e559196bfc7b9a929f9
DIFF: https://github.com/llvm/llvm-project/commit/3b625060fc91598d28196e559196bfc7b9a929f9.diff
LOG: [libc++] [libc++abi] Use C++20 standard.
This change is needed to use char8_t when building libc++.
Using the same standard in libc++abi for coherence.
See https://reviews.llvm.org/D91517.
Reviewed By: ldionne, #libc, #libc_abi
Differential Revision: https://reviews.llvm.org/D91691
Added:
Modified:
libcxx/CMakeLists.txt
libcxxabi/src/CMakeLists.txt
Removed:
################################################################################
diff --git a/libcxx/CMakeLists.txt b/libcxx/CMakeLists.txt
index dd4c93b59d33..f4c7e9992f71 100644
--- a/libcxx/CMakeLists.txt
+++ b/libcxx/CMakeLists.txt
@@ -514,11 +514,11 @@ remove_flags(-Wno-pedantic -pedantic-errors -pedantic)
# 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
index 7353c2086b94..a8e12aa36e64 100644
--- a/libcxxabi/src/CMakeLists.txt
+++ b/libcxxabi/src/CMakeLists.txt
@@ -174,9 +174,9 @@ if (LIBCXXABI_ENABLE_SHARED)
CXX_EXTENSIONS
OFF
CXX_STANDARD
- 17
+ 20
CXX_STANDARD_REQUIRED
- ON
+ OFF
COMPILE_FLAGS
"${LIBCXXABI_COMPILE_FLAGS}"
LINK_FLAGS
@@ -241,9 +241,9 @@ if (LIBCXXABI_ENABLE_STATIC)
CXX_EXTENSIONS
OFF
CXX_STANDARD
- 17
+ 20
CXX_STANDARD_REQUIRED
- ON
+ OFF
COMPILE_FLAGS
"${LIBCXXABI_COMPILE_FLAGS}"
LINK_FLAGS
More information about the llvm-branch-commits
mailing list