Skip to content

Commit 542d433

Browse files
committed
[libc++][doc] Updates the release notes.
This is a preparation for the upcoming LLVM 18 release.
1 parent 8803112 commit 542d433

File tree

4 files changed

+67
-19
lines changed

4 files changed

+67
-19
lines changed

libcxx/docs/Hardening.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
.. _hardening-modes:
2+
13
===============
24
Hardening Modes
35
===============

libcxx/docs/ReleaseNotes/18.rst

Lines changed: 63 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,25 @@ see the `releases page <https://llvm.org/releases/>`_.
3535
What's New in Libc++ 18.0.0?
3636
==============================
3737

38-
- A new debug mode has been added, replacing the legacy debug mode that was
39-
removed in the LLVM 17 release. See ``libcxx/docs/Hardening.rst`` for more
40-
details.
38+
The main focus of the libc++ team has been to implement new C++20, C++23,
39+
and C++26 features.
40+
41+
A new debug mode has been added, replacing the legacy debug mode that was
42+
removed in the LLVM 17 release. See :ref:`hardening-modes` for more details.
43+
44+
Work on the ranges support has progressed. See
45+
:ref:`ranges-status` for the current status.
46+
47+
Work on the experimental C++23 module support has progressed. The ``std.compat``
48+
module is available and the feature is retroactively available in C++20. See
49+
:ref:`ModulesInLibcxx` for more information.
50+
51+
Work on the experimental C++17 Parallel STL has progressed. See
52+
:ref:`pstl-status` for the current status.
53+
54+
Work on the experimental C++17 SIMD support has progressed. See
55+
:ref:`parallelism-status` for the current status.
56+
4157

4258
Implemented Papers
4359
------------------
@@ -65,7 +81,7 @@ Implemented Papers
6581
Improvements and New Features
6682
-----------------------------
6783

68-
- ``std::ranges::count`` is now optimized for ``vector<bool>::iterator``, which
84+
- ``std::ranges::count`` is now optimized for ``std::vector<bool>::iterator``, which
6985
can lead up to 350x performance improvements.
7086

7187
- ``std::for_each`` has been optimized for segmented iterators like ``std::deque::iterator`` in C++23 and
@@ -89,6 +105,11 @@ Improvements and New Features
89105
- The ``_LIBCPP_ENABLE_CXX20_REMOVED_SHARED_PTR_UNIQUE`` macro has been added to make
90106
the function ``std::shared_ptr<...>::unique()`` available.
91107

108+
- Asan annotations have been added to ``std::basic_string``.
109+
110+
- The libc++ source code has been formatted with ``clang-format``. This
111+
`discourse thread <https://discourse.llvm.org/t/rfc-clang-formatting-all-of-libc-once-and-for-all>`_
112+
contains information how to rebase downstream patches.
92113

93114
Deprecations and Removals
94115
-------------------------
@@ -101,7 +122,7 @@ Deprecations and Removals
101122
- The non-conforming constructor ``std::future_error(std::error_code)`` has been removed. Please use the
102123
``std::future_error(std::future_errc)`` constructor provided in C++17 instead.
103124

104-
- `P1957 <https://wg21.link/P1957>` has been implemented in Clang and libc++ removed a code path that led to
125+
- `P1957 <https://wg21.link/P1957>`_ has been implemented in Clang and libc++ removed a code path that led to
105126
narrowing conversions in ``std::variant`` behaving in a non-standard way. This may change how some uses of
106127
``std::variant``'s constructor behave in user code. The ``_LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT``
107128
macro is provided to restore the previous behavior, and it will be supported in the LLVM 18 release only.
@@ -129,12 +150,23 @@ Deprecations and Removals
129150
that were removed in the C++17 and C++20 standards. Instead of using these
130151
macros, please use the macros to re-enable individual features.
131152

153+
- The macro ``_LIBCPP_INLINE_VISIBILITY`` has been deprecated in LLVM 18 and
154+
will be removed entirely in LLVM 19. The macro ``_LIBCPP_HIDE_FROM_ABI`` is
155+
the drop-in replacement.
156+
157+
- The macro ``_VSTD`` has been deprecated in LLVM 18 and will be removed
158+
entirely in LLVM 19. The code ``std`` is the drop-in replacement.
159+
160+
132161
Upcoming Deprecations and Removals
133162
----------------------------------
134163

135164
LLVM 19
136165
~~~~~~~
137166

167+
- The ``LIBCXX_EXECUTOR`` CMake variable has been deprecated. LLVM 19 will
168+
completely remove support for the ``*_EXECUTOR`` variables.
169+
138170
- The ``LIBCXX_ENABLE_ASSERTIONS`` CMake variable that was used to enable the safe mode will be deprecated and setting
139171
it will trigger an error; use the ``LIBCXX_HARDENING_MODE`` variable with the value ``extensive`` instead. Similarly,
140172
the ``_LIBCPP_ENABLE_ASSERTIONS`` macro will be deprecated (setting it to ``1`` still enables the extensive mode the
@@ -159,6 +191,12 @@ LLVM 19
159191
``_LIBCPP_ENABLE_CXX20_REMOVED_FEATURES`` macros have been deprecated
160192
in LLVM 18 and will be removed entirely in LLVM 19.
161193

194+
- The macro ``_LIBCPP_INLINE_VISIBILITY`` has been deprecated in LLVM 18 and
195+
will be removed entirely in LLVM 19.
196+
197+
- The macro ``_VSTD`` has been deprecated in LLVM 18 and will be removed
198+
entirely in LLVM 19.
199+
162200
LLVM 20
163201
~~~~~~~
164202

@@ -175,12 +213,12 @@ ABI Affecting Changes
175213
- This release of libc++ added missing visibility annotations on some types in the library. Users compiling with
176214
``-fvisbility=hidden`` may notice that additional type infos from libc++ are being exported from their ABI. This is
177215
the correct behavior in almost all cases since exporting the RTTI is required for these types to work properly with
178-
dynamic_cast, exceptions and other mechanisms across binaries. However, if you intend to use libc++ purely as an
216+
``dynamic_cast``, exceptions and other mechanisms across binaries. However, if you intend to use libc++ purely as an
179217
internal implementation detail (i.e. you use libc++ as a static archive and never export libc++ symbols from your ABI)
180218
and you notice changes to your exported symbols list, then this means that you were not properly preventing libc++
181219
symbols from being part of your ABI.
182220

183-
- The name mangling for intantiations of ``std::projected`` has changed in order to implement P2538R1. This technically
221+
- The name mangling for instantiations of ``std::projected`` has changed in order to implement P2538R1. This technically
184222
results in an ABI break, however in practice we expect uses of ``std::projected`` in ABI-sensitive places to be
185223
extremely rare. Any error resulting from this change should result in a link-time error.
186224

@@ -191,18 +229,26 @@ ABI Affecting Changes
191229
to throw a different exception when attempting allocations that are too large
192230
(``std::bad_alloc`` vs ``std::length_error``).
193231

194-
- The layout of some views inside ``std::ranges`` that use the ``movable-box`` exposition-only type as an implementation
195-
detail has changed in order to fix a bug which could result in overwriting user data following the ``movable-box``
196-
<https://github.com/llvm/llvm-project/issues/70506>.
197-
This was caused by incorrect usage of the ``[[no_unique_address]]`` attribute inside the implementation of ``movable-box``.
198-
This only affects the layout of the following views: ``take_while_view``, ``filter_view``, ``single_view``, ``drop_while_view``,
199-
``repeat_view``, ``transform_view``, ``chunk_by_view``. In order to avoid silent breakage, an ABI tag has been added to
200-
these views such that their mangled name will be different starting in this version of libc++.
201-
As a result, attempting to call a function that expects one of these views will fail to link until the code has been rebuilt
202-
against a matching version of libc++. In practice, we believe it is unusual for these views to appear at ABI boundaries so this
203-
should not be a major problem for most users. However it is probably worth auditing ranges-heavy code for ABI boundaries that
232+
- The layout of some views inside ``std::ranges`` that use the ``movable-box`` exposition-only type as an implementation
233+
detail has changed in order to fix a `bug <https://github.com/llvm/llvm-project/issues/70506>`_ which could result in
234+
overwriting user data following the ``movable-box``.
235+
This was caused by incorrect usage of the ``[[no_unique_address]]`` attribute inside the implementation of ``movable-box``.
236+
This affects the layout of the following views: ``take_while_view``, ``filter_view``, ``single_view``, ``drop_while_view``,
237+
``repeat_view``, ``transform_view``, ``chunk_by_view``. In order to avoid silent breakage, an ABI tag has been added to
238+
these views such that their mangled name will be different starting in this version of libc++.
239+
As a result, attempting to call a function that expects one of these views will fail to link until the code has been rebuilt
240+
against a matching version of libc++. In practice, we believe it is unusual for these views to appear at ABI boundaries so this
241+
should not be a major problem for most users. However it is probably worth auditing ranges-heavy code for ABI boundaries that
204242
would contain these views, or for types that contain these views as members and which are passed across ABI boundaries.
205243

244+
- Some properties of libc++ may cause ODR-violations when mixing multiple libc++
245+
instances. To avoid these, often benign, ODR-violations the ODR-affecting
246+
properties are now part of the ABI tag. The ODR-affecting properties are:
247+
248+
- library version
249+
- exceptions vs no-exceptions
250+
- hardening mode
251+
206252
Build System Changes
207253
--------------------
208254

libcxx/docs/Status/Parallelism.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. parallelism-status:
1+
.. _parallelism-status:
22

33
====================================
44
libc++ Parallelism TS Status (N4808)

libcxx/docs/Status/Ranges.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.. ranges-status:
1+
.. _ranges-status:
22

33
================================
44
libc++ Ranges Status

0 commit comments

Comments
 (0)