[libcxx-commits] [PATCH] D91691: [libc++] [libc++abi] Use C++20 standard.

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Fri Nov 20 08:52:45 PST 2020


curdeius updated this revision to Diff 306708.
curdeius added a comment.

- Make C++ standard non-required, so that compilers that do not accept -std=c++2a are pleased (gcc < 8).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91691/new/

https://reviews.llvm.org/D91691

Files:
  libcxx/CMakeLists.txt
  libcxxabi/src/CMakeLists.txt


Index: libcxxabi/src/CMakeLists.txt
===================================================================
--- libcxxabi/src/CMakeLists.txt
+++ 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
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -511,11 +511,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


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91691.306708.patch
Type: text/x-patch
Size: 1845 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201120/d45a2d4c/attachment.bin>


More information about the libcxx-commits mailing list