Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 1 | ========================================= |
Tom Stellard | ce41e66 | 2021-07-27 21:51:07 -0700 | [diff] [blame] | 2 | Libc++ 14.0.0 (In-Progress) Release Notes |
Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 3 | ========================================= |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 4 | |
| 5 | .. contents:: |
| 6 | :local: |
| 7 | :depth: 2 |
| 8 | |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 9 | Written by the `Libc++ Team <https://libcxx.llvm.org>`_ |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 10 | |
| 11 | .. warning:: |
| 12 | |
Tom Stellard | ce41e66 | 2021-07-27 21:51:07 -0700 | [diff] [blame] | 13 | These are in-progress notes for the upcoming libc++ 14 release. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 14 | Release notes for previous releases can be found on |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 15 | `the Download Page <https://releases.llvm.org/download.html>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 16 | |
| 17 | Introduction |
| 18 | ============ |
| 19 | |
| 20 | This document contains the release notes for the libc++ C++ Standard Library, |
Tom Stellard | ce41e66 | 2021-07-27 21:51:07 -0700 | [diff] [blame] | 21 | part of the LLVM Compiler Infrastructure, release 14.0.0. Here we describe the |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 22 | status of libc++ in some detail, including major improvements from the previous |
| 23 | release and new feature work. For the general LLVM release notes, see `the LLVM |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 24 | documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may |
| 25 | be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 26 | |
| 27 | For more information about libc++, please see the `Libc++ Web Site |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 28 | <https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 29 | |
Hans Wennborg | fc14f4e | 2020-01-15 10:02:56 +0100 | [diff] [blame] | 30 | Note that if you are reading this file from a Git checkout or the |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 31 | main Libc++ web page, this document applies to the *next* release, not |
| 32 | the current one. To see the release notes for a specific release, please |
Hans Wennborg | 3329a84 | 2018-09-10 08:57:12 +0000 | [diff] [blame] | 33 | see the `releases page <https://llvm.org/releases/>`_. |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 34 | |
Tom Stellard | ce41e66 | 2021-07-27 21:51:07 -0700 | [diff] [blame] | 35 | What's New in Libc++ 14.0.0? |
Hans Wennborg | 003a998 | 2019-07-18 11:51:05 +0000 | [diff] [blame] | 36 | ============================ |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 37 | |
| 38 | New Features |
| 39 | ------------ |
| 40 | |
Mark de Wever | cb50a05 | 2020-12-19 13:52:07 +0100 | [diff] [blame] | 41 | - There's initial support for the C++20 header ``<format>``. The implementation |
| 42 | is incomplete. Some functions are known to be inefficient; both in memory |
| 43 | usage and performance. The implementation is considered experimental and isn't |
| 44 | considered ABI stable. |
Mark de Wever | ebbd3b6 | 2021-05-25 20:11:08 +0200 | [diff] [blame] | 45 | - There's a new CMake option ``LIBCXX_ENABLE_UNICODE`` to disable Unicode |
| 46 | support in the ``<format>`` header. This only affects the estimation of the |
| 47 | output width of the format functions. |
Raul Tambre | afcedea | 2020-06-19 12:43:33 +0530 | [diff] [blame] | 48 | |
Louis Dionne | 4222207 | 2018-09-06 14:46:22 +0000 | [diff] [blame] | 49 | API Changes |
| 50 | ----------- |
Martin Storsjö | e3a7197 | 2020-10-26 13:18:46 +0200 | [diff] [blame] | 51 | |
Louis Dionne | 8925814 | 2021-08-23 15:32:36 -0400 | [diff] [blame] | 52 | - Support for building libc++ on top of a C Standard Library that does not support ``wchar_t`` was |
| 53 | added. This is useful for building libc++ in an embedded setting, and it adds itself to the various |
| 54 | freestanding-friendly options provided by libc++. |
Sylvestre Ledru | b6e1b31 | 2021-10-04 11:06:45 +0200 | [diff] [blame] | 55 | |
| 56 | Build System Changes |
| 57 | -------------------- |
| 58 | |
| 59 | - Building the libc++ shared or static library requires a C++ 20 capable compiler. |
| 60 | Use ``-DLLVM_ENABLE_PROJECTS='clang;compiler-rt' -DLLVM_ENABLE_RUNTIMES='libcxx;libcxxabi'`` |
| 61 | to build libc++ using a fresh build of Clang. |
Mark de Wever | 494905b | 2021-06-09 20:26:34 +0200 | [diff] [blame] | 62 | |
| 63 | - The functions ``std::atomic<T*>::fetch_(add|sub)`` and |
| 64 | ``std::atomic_fetch_(add|sub)`` no longer accept a function pointer. While |
| 65 | this is technically an API break, the invalid syntax isn't supported by |
| 66 | libstc++ and MSVC STL. See https://godbolt.org/z/49fvzz98d. |
| 67 | |
| 68 | - The call of the functions ``std::atomic_(add|sub)(std::atomic<T*>*, ...)`` |
| 69 | with the explicit template argument ``T`` are now ill-formed. While this is |
| 70 | technically an API break, the invalid syntax isn't supported by libstc++ and |
| 71 | MSVC STL. See https://godbolt.org/z/v9959re3v. |
| 72 | |
| 73 | Due to this change it's now possible to call these functions with the |
| 74 | explicit template argument ``T*``. This allows using the same syntax on the |
| 75 | major Standard library implementations. |
| 76 | See https://godbolt.org/z/oEfzPhTTb. |
| 77 | |
| 78 | Calls to these functions where the template argument was deduced by the |
| 79 | compiler are unaffected by this change. |