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

Marek Kurdej via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 18 02:32:45 PST 2020


curdeius created this revision.
curdeius added a reviewer: ldionne.
Herald added subscribers: libcxx-commits, mgorny.
Herald added projects: libc++, libc++abi.
Herald added a reviewer: libc++.
Herald added a reviewer: libc++abi.
curdeius requested review of this revision.

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.


Repository:
  rG LLVM Github Monorepo

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,7 +174,7 @@
                           CXX_EXTENSIONS
                             OFF
                           CXX_STANDARD
-                            17
+                            20
                           CXX_STANDARD_REQUIRED
                             ON
                           COMPILE_FLAGS
@@ -241,7 +241,7 @@
                           CXX_EXTENSIONS
                             OFF
                           CXX_STANDARD
-                            17
+                            20
                           CXX_STANDARD_REQUIRED
                             ON
                           COMPILE_FLAGS
Index: libcxx/CMakeLists.txt
===================================================================
--- libcxx/CMakeLists.txt
+++ libcxx/CMakeLists.txt
@@ -511,10 +511,10 @@
 # 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 20
     CXX_STANDARD_REQUIRED YES
     CXX_EXTENSIONS NO)
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91691.306018.patch
Type: text/x-patch
Size: 1481 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201118/7d1e8196/attachment.bin>


More information about the libcxx-commits mailing list