[libc++] Update to Clang 21 as the oldest supported version (#186062)

This commit is contained in:
Nikolas Klauser 2026-04-20 16:08:36 +02:00 committed by GitHub
parent f5147e5572
commit 5d98f79f52
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 24 deletions

View file

@ -47,8 +47,8 @@ jobs:
'generic-cxx26',
'generic-modules'
]
cc: [ 'clang-22' ]
cxx: [ 'clang++-22' ]
cc: [ 'clang-23' ]
cxx: [ 'clang++-23' ]
include:
- config: 'generic-gcc'
cc: 'gcc-15'
@ -92,18 +92,18 @@ jobs:
'generic-cxx20',
'generic-cxx23'
]
cc: [ 'clang-22' ]
cxx: [ 'clang++-22' ]
cc: [ 'clang-23' ]
cxx: [ 'clang++-23' ]
include:
- config: 'generic-gcc-cxx11'
cc: 'gcc-15'
cxx: 'g++-15'
- config: 'generic-cxx26'
cc: 'clang-22'
cxx: 'clang++-22'
- config: 'generic-cxx26'
cc: 'clang-21'
cxx: 'clang++-21'
- config: 'generic-cxx26'
cc: 'clang-20'
cxx: 'clang++-20'
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
@ -176,8 +176,8 @@ jobs:
pip install -r libcxx/test/requirements.txt
libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
CC: clang-22
CXX: clang++-22
CC: clang-23
CXX: clang++-23
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
@ -276,11 +276,11 @@ jobs:
- name: Install a current LLVM
if: ${{ matrix.mingw != true }}
run: |
choco install -y llvm --version=20.1.8 --allow-downgrade
choco install -y llvm --version=21.1.8 --allow-downgrade
- name: Install llvm-mingw
if: ${{ matrix.mingw == true }}
run: |
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20250709/llvm-mingw-20250709-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip
curl -LO https://github.com/mstorsjo/llvm-mingw/releases/download/20251216/llvm-mingw-20251216-ucrt-${{ matrix.runner == 'windows-11-arm' && 'aarch64' || 'x86_64' }}.zip
powershell Expand-Archive llvm-mingw*.zip -DestinationPath .
del llvm-mingw*.zip
mv llvm-mingw* c:\llvm-mingw

View file

@ -131,7 +131,7 @@ velocity, libc++ drops support for older compilers as newer ones are released.
============ =================== ========================== =====================
Compiler Versions Restrictions Support policy
============ =================== ========================== =====================
Clang 20, 21, 22-git latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
Clang 21, 22, 23-git latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
AppleClang 26.0 latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
Open XL 17.1.4 (AIX) latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
GCC 15 In C++11 or later only latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_

View file

@ -33,8 +33,8 @@
// Warn if a compiler version is used that is not supported anymore
// LLVM RELEASE Update the minimum compiler versions
# if defined(_LIBCPP_CLANG_VER)
# if _LIBCPP_CLANG_VER < 2001
# warning "Libc++ only supports Clang 20 and later"
# if _LIBCPP_CLANG_VER < 2101
# warning "Libc++ only supports Clang 21 and later"
# endif
# elif defined(_LIBCPP_APPLE_CLANG_VER)
# if _LIBCPP_APPLE_CLANG_VER < 1700

View file

@ -10,13 +10,6 @@
# alphabetic macros. Also ensure that we don't swallow the definition of user
# provided macros (in other words, ensure that we push/pop correctly everywhere).
# This test fails with MSVC headers, with Clang 20 (and early 21 versions);
# the headers end up pulling in Clang intrinsics headers, which in 20.x and
# early 21.x versions use unreserved identifiers,
# see https://github.com/llvm/llvm-project/issues/161808.
#
# UNSUPPORTED: clang-20 && msvc
# RUN: %{python} %s %{libcxx-dir}/utils
# END.

View file

@ -9,7 +9,7 @@
// https://github.com/llvm/llvm-project/issues/30023
// compare exchange does not work with types of which the size is not a power of 2
// XFAIL: clang-20, clang-21, apple-clang-17
// XFAIL: clang-21, apple-clang-17
// UNSUPPORTED: c++03
// TODO: remove the UNSUPPORTED clang-22 once libc++ CI's clang is updated to include

View file

@ -144,8 +144,8 @@ steps:
- label: FreeBSD 13 amd64
command: libcxx/utils/ci/run-buildbot generic-cxx26
env:
CC: clang20
CXX: clang++20
CC: clang21
CXX: clang++21
agents:
queue: libcxx-builders
os: freebsd

View file

@ -81,6 +81,7 @@ static void demangling_terminate_handler()
__attribute__((noreturn))
static void demangling_terminate_handler()
{
(void)cause;
__abort_message("terminating");
}
#endif // !_LIBCXXABI_NO_EXCEPTIONS