2019-07-18 19:51:05 +08:00
|
|
|
=========================================
|
2021-07-28 12:51:07 +08:00
|
|
|
Libc++ 14.0.0 (In-Progress) Release Notes
|
2019-07-18 19:51:05 +08:00
|
|
|
=========================================
|
2018-09-06 22:46:22 +08:00
|
|
|
|
|
|
|
.. contents::
|
|
|
|
:local:
|
|
|
|
:depth: 2
|
|
|
|
|
2018-09-10 16:57:12 +08:00
|
|
|
Written by the `Libc++ Team <https://libcxx.llvm.org>`_
|
2018-09-06 22:46:22 +08:00
|
|
|
|
|
|
|
.. warning::
|
|
|
|
|
2021-07-28 12:51:07 +08:00
|
|
|
These are in-progress notes for the upcoming libc++ 14 release.
|
2018-09-06 22:46:22 +08:00
|
|
|
Release notes for previous releases can be found on
|
2018-09-10 16:57:12 +08:00
|
|
|
`the Download Page <https://releases.llvm.org/download.html>`_.
|
2018-09-06 22:46:22 +08:00
|
|
|
|
|
|
|
Introduction
|
|
|
|
============
|
|
|
|
|
|
|
|
This document contains the release notes for the libc++ C++ Standard Library,
|
2021-07-28 12:51:07 +08:00
|
|
|
part of the LLVM Compiler Infrastructure, release 14.0.0. Here we describe the
|
2018-09-06 22:46:22 +08:00
|
|
|
status of libc++ in some detail, including major improvements from the previous
|
|
|
|
release and new feature work. For the general LLVM release notes, see `the LLVM
|
2018-09-10 16:57:12 +08:00
|
|
|
documentation <https://llvm.org/docs/ReleaseNotes.html>`_. All LLVM releases may
|
|
|
|
be downloaded from the `LLVM releases web site <https://llvm.org/releases/>`_.
|
2018-09-06 22:46:22 +08:00
|
|
|
|
|
|
|
For more information about libc++, please see the `Libc++ Web Site
|
2018-09-10 16:57:12 +08:00
|
|
|
<https://libcxx.llvm.org>`_ or the `LLVM Web Site <https://llvm.org>`_.
|
2018-09-06 22:46:22 +08:00
|
|
|
|
2020-01-15 17:02:56 +08:00
|
|
|
Note that if you are reading this file from a Git checkout or the
|
2018-09-06 22:46:22 +08:00
|
|
|
main Libc++ web page, this document applies to the *next* release, not
|
|
|
|
the current one. To see the release notes for a specific release, please
|
2018-09-10 16:57:12 +08:00
|
|
|
see the `releases page <https://llvm.org/releases/>`_.
|
2018-09-06 22:46:22 +08:00
|
|
|
|
2021-07-28 12:51:07 +08:00
|
|
|
What's New in Libc++ 14.0.0?
|
2019-07-18 19:51:05 +08:00
|
|
|
============================
|
2018-09-06 22:46:22 +08:00
|
|
|
|
|
|
|
New Features
|
|
|
|
------------
|
|
|
|
|
2020-12-19 20:52:07 +08:00
|
|
|
- There's initial support for the C++20 header ``<format>``. The implementation
|
|
|
|
is incomplete. Some functions are known to be inefficient; both in memory
|
|
|
|
usage and performance. The implementation is considered experimental and isn't
|
|
|
|
considered ABI stable.
|
2021-10-19 01:58:31 +08:00
|
|
|
|
2021-05-26 02:11:08 +08:00
|
|
|
- There's a new CMake option ``LIBCXX_ENABLE_UNICODE`` to disable Unicode
|
|
|
|
support in the ``<format>`` header. This only affects the estimation of the
|
|
|
|
output width of the format functions.
|
2020-06-19 15:13:33 +08:00
|
|
|
|
2021-08-24 03:32:36 +08:00
|
|
|
- Support for building libc++ on top of a C Standard Library that does not support ``wchar_t`` was
|
|
|
|
added. This is useful for building libc++ in an embedded setting, and it adds itself to the various
|
|
|
|
freestanding-friendly options provided by libc++.
|
2021-10-04 17:06:45 +08:00
|
|
|
|
2021-10-19 01:58:31 +08:00
|
|
|
API Changes
|
|
|
|
-----------
|
2021-06-10 02:26:34 +08:00
|
|
|
|
|
|
|
- The functions ``std::atomic<T*>::fetch_(add|sub)`` and
|
|
|
|
``std::atomic_fetch_(add|sub)`` no longer accept a function pointer. While
|
|
|
|
this is technically an API break, the invalid syntax isn't supported by
|
|
|
|
libstc++ and MSVC STL. See https://godbolt.org/z/49fvzz98d.
|
|
|
|
|
|
|
|
- The call of the functions ``std::atomic_(add|sub)(std::atomic<T*>*, ...)``
|
|
|
|
with the explicit template argument ``T`` are now ill-formed. While this is
|
|
|
|
technically an API break, the invalid syntax isn't supported by libstc++ and
|
|
|
|
MSVC STL. See https://godbolt.org/z/v9959re3v.
|
|
|
|
|
|
|
|
Due to this change it's now possible to call these functions with the
|
|
|
|
explicit template argument ``T*``. This allows using the same syntax on the
|
|
|
|
major Standard library implementations.
|
|
|
|
See https://godbolt.org/z/oEfzPhTTb.
|
|
|
|
|
|
|
|
Calls to these functions where the template argument was deduced by the
|
|
|
|
compiler are unaffected by this change.
|
2021-10-08 04:19:11 +08:00
|
|
|
|
2021-10-19 01:58:31 +08:00
|
|
|
Build System Changes
|
|
|
|
--------------------
|
|
|
|
|
|
|
|
- Building the libc++ shared or static library requires a C++ 20 capable compiler.
|
|
|
|
Consider using a Bootstrapping build to build libc++ with a fresh Clang if you
|
|
|
|
can't use the system compiler to build libc++ anymore.
|
|
|
|
|
2021-10-08 04:19:11 +08:00
|
|
|
- Historically, there has been numerous ways of building libc++ and libc++abi. This has
|
|
|
|
culminated in over 5 different ways to build the runtimes, which made it impossible to
|
|
|
|
maintain with a good level of support. Starting with this release, the runtimes support
|
|
|
|
exactly two ways of being built, which should cater to all use-cases. Furthermore,
|
|
|
|
these builds are as lightweight as possible and will work consistently even when targetting
|
|
|
|
embedded platforms, which used not to be the case. Please see the documentation on building
|
|
|
|
libc++ to see those two ways of building and migrate over to the appropriate build instructions
|
|
|
|
as soon as possible.
|
|
|
|
|
|
|
|
All other ways to build are deprecated and will not be supported in the next release.
|
|
|
|
We understand that making these changes can be daunting. For that reason, here's a
|
|
|
|
summary of how to migrate from the two most common ways to build:
|
|
|
|
|
|
|
|
- If you were rooting your CMake invocation at ``<monorepo>/llvm`` and passing ``-DLLVM_ENABLE_PROJECTS=<...>``
|
|
|
|
(which was the previously advertised way to build the runtimes), please simply root your CMake invocation at
|
|
|
|
``<monorepo>/runtimes`` and pass ``-DLLVM_ENABLE_RUNTIMES=<...>``.
|
|
|
|
|
|
|
|
- If you were doing two CMake invocations, one rooted at ``<monorepo>/libcxx`` and one rooted at
|
|
|
|
``<monorepo>/libcxxabi`` (this used to be called a "Standalone build"), please move them to a
|
|
|
|
single invocation like so:
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ cmake -S <monorepo>/libcxx -B libcxx-build <LIBCXX-OPTIONS>
|
|
|
|
$ cmake -S <monorepo>/libcxxabi -B libcxxabi-build <LIBCXXABI-OPTIONS>
|
|
|
|
|
|
|
|
should become
|
|
|
|
|
|
|
|
.. code-block:: bash
|
|
|
|
|
|
|
|
$ cmake -S <monorepo>/runtimes -B build -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi" <LIBCXX-OPTIONS> <LIBCXXABI-OPTIONS>
|