[libcxx-commits] [libcxx] [llvm] [libc++] Update to Clang 21 as the oldest supported version (PR #186062)
Nikolas Klauser via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Mar 12 02:49:13 PDT 2026
https://github.com/philnik777 updated https://github.com/llvm/llvm-project/pull/186062
>From 8f6fbf5eb9a7f0f03a1123fb7eadf5dc117f96c7 Mon Sep 17 00:00:00 2001
From: Nikolas Klauser <nikolasklauser at berlin.de>
Date: Thu, 12 Mar 2026 10:28:56 +0100
Subject: [PATCH] [libc++] Update to Clang 21 as the oldest supported version
---
.github/workflows/libcxx-build-and-test.yaml | 22 +++++++++----------
libcxx/docs/index.rst | 2 +-
libcxx/include/__configuration/compiler.h | 4 ++--
.../test/libcxx/system_reserved_names.gen.py | 7 ------
.../cas_non_power_of_2.pass.cpp | 2 +-
libcxx/utils/ci/buildkite-pipeline.yml | 4 ++--
6 files changed, 17 insertions(+), 24 deletions(-)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index d707902d05dc3..fbde7dddc5cb7 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -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'
@@ -86,18 +86,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 at 8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: ${{ matrix.config }}
@@ -159,8 +159,8 @@ jobs:
- name: ${{ matrix.config }}
run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
env:
- CC: clang-22
- CXX: clang++-22
+ CC: clang-23
+ CXX: clang++-23
- uses: actions/upload-artifact at b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
if: always()
with:
@@ -255,11 +255,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
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index b23961c5e66aa..cc2b06dfbc85f 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -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.3 (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>`_
diff --git a/libcxx/include/__configuration/compiler.h b/libcxx/include/__configuration/compiler.h
index 7cd81e03b05ba..6ee7400cd1755 100644
--- a/libcxx/include/__configuration/compiler.h
+++ b/libcxx/include/__configuration/compiler.h
@@ -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
diff --git a/libcxx/test/libcxx/system_reserved_names.gen.py b/libcxx/test/libcxx/system_reserved_names.gen.py
index aaede220531d2..bb0bbeb1caf82 100644
--- a/libcxx/test/libcxx/system_reserved_names.gen.py
+++ b/libcxx/test/libcxx/system_reserved_names.gen.py
@@ -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.
diff --git a/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp b/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
index 602bd1612015d..7b9de7f3c3cee 100644
--- a/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
+++ b/libcxx/test/std/atomics/atomics.types.generic/cas_non_power_of_2.pass.cpp
@@ -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
diff --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index 1938d9a67af28..eb2804e5cbef1 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -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
More information about the libcxx-commits
mailing list