13 Commits

Author SHA1 Message Date
Nikolas Klauser
7f845cba2c
[libc++] Update the CI to Clang-20 and drop Clang-17 support (#117429) 2025-01-28 12:35:33 +01:00
Brad Smith
6bc68d0fe9
[libc++] Remove support for Android 4 and older (#124062) 2025-01-23 10:27:26 +01:00
Sean Perry
b3ad84b534
[libc++][z/OS] __cxx03 subdir was added by mistake (#122763)
The header <features.h> is a system header. It's not part of the headers
in __cxx03.
2025-01-13 14:02:20 -05:00
LoS
dab6463e74
[libc++] Remove duplicated _LIBCPP_HIDE_FROM_ABI from a few declarations (#122323) 2025-01-10 11:42:42 -05:00
A. Jiang
85ca551763
[libc++][chrono] Entirely remove relational operators for std::chrono::weekday (#122428)
Follows-up #98730.
2025-01-10 13:49:52 +01:00
Nikolas Klauser
b9a2658a3e
[libc++][C++03] Use __cxx03/ headers in C++03 mode (#109002)
This patch implements the forwarding to frozen C++03 headers as
discussed in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc. In the
RFC, we initially proposed selecting the right headers from the Clang
driver, however consensus seemed to steer towards handling this in the
library itself. This patch implements that direction.

At a high level, the changes basically amount to making each public
header look like this:

```
// inside <vector>
#ifdef _LIBCPP_CXX03_LANG
#  include <__cxx03/vector>
#else
  // normal <vector> content
#endif
```

In most cases, public headers are simple umbrella headers so there isn't
much code in the #else branch. In other cases, the #else branch contains
the actual implementation of the header.
2024-12-21 13:01:48 +01:00
Nikolas Klauser
ce7771902d
[libc++][C++03] Update include guards (#109001)
This patch updates the includes guards of the C++ 03 headers.

This is part of https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc.
2024-12-09 17:34:37 +01:00
Jay Foad
d6fc7d3ab1 Fix typo "intead" 2024-11-21 14:48:38 +00:00
Alexander Richardson
30feb35c1e
[libc++] Update CMake dependency for generate_iwyu_mapping.py (#115387)
This script does not depend on the generated headers since those are
already special-cased in header_information.py. Change the dependency
list to depend on header_information.py instead. While looking at this
code also simplify the assignment to libcxx_root inside this script.
2024-11-11 09:59:58 -05:00
Nikolas Klauser
73fbae8383
[libc++][C++03] Fix libc++ includes (#109000)
This is part of the "Freezing C++03 headers" proposal explained in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319/58.

This patch updates the include paths used in `__cxx03/` to refer to the
`__cxx03/` headers.
2024-10-31 12:10:20 +01:00
Nikolas Klauser
e78f53d1e8
Reapply "[libc++][C++03] Copy the LLVM 19 headers (#108999)" (#112127)
This reverts commit 68c04b0ae62d8431d72d8b47fc13008002ee4387.

This disables the IWYU mapping that caused the failure, since
the headers aren't reachable for now.

This is the first part of the "Freezing C++03 headers" proposal
explained in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319/58.

This patch mechanically copies the headers as of the LLVM 19.1 release
into a subdirectory of libc++ so that we can start using these headers
when building in C++03 mode. We are going to be backporting important
changes to that copy of the headers until the LLVM 21 release. After the
LLVM 21 release, only critical bugfixes will be fixed in the C++03 copy
of the headers.

This patch only performs a copy of the headers -- these headers are
still unused by the rest of the codebase.
2024-10-24 00:17:37 +02:00
Sylvestre Ledru
68c04b0ae6 Revert "[libc++][C++03] Copy the LLVM 19 headers (#108999)"
it causes: https://github.com/llvm/llvm-project/issues/110808

This reverts commit 67432f20491a0fa6b05f8a3a91f88e26175453d6.
2024-10-02 11:53:16 +02:00
Nikolas Klauser
67432f2049
[libc++][C++03] Copy the LLVM 19 headers (#108999)
This is the first part of the "Freezing C++03 headers" proposal
explained in
https://discourse.llvm.org/t/rfc-freezing-c-03-headers-in-libc/77319/58.

This patch mechanically copies the headers as of the LLVM 19.1 release
into a subdirectory of libc++ so that we can start using these headers
when building in C++03 mode. We are going to be backporting important
changes to that copy of the headers until the LLVM 21 release. After the
LLVM 21 release, only critical bugfixes will be fixed in the C++03 copy
of the headers.

This patch only performs a copy of the headers -- these headers are
still unused by the rest of the codebase.
2024-10-01 22:57:30 +02:00