Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc++] Updates the compilers used post LLVM-20 branching. #126564

Merged
merged 2 commits into from
Feb 18, 2025

Conversation

mordante
Copy link
Member

Once LLVM 20 is released the clang-18 will no longer be supported.

@mordante mordante requested a review from a team as a code owner February 10, 2025 18:11
@llvmbot llvmbot added libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi. github:workflow labels Feb 10, 2025
@mordante
Copy link
Member Author

@Zingam FYI this patch contains the documentation update.

@llvmbot
Copy link
Member

llvmbot commented Feb 10, 2025

@llvm/pr-subscribers-github-workflow

Author: Mark de Wever (mordante)

Changes

Once LLVM 20 is released the clang-18 will no longer be supported.


Full diff: https://github.com/llvm/llvm-project/pull/126564.diff

2 Files Affected:

  • (modified) .github/workflows/libcxx-build-and-test.yaml (+13-9)
  • (modified) libcxx/docs/index.rst (+8-8)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index ee77e83363d37a0..502ab35313dc7a7 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -48,8 +48,8 @@ jobs:
           'generic-cxx26',
           'generic-modules'
         ]
-        cc: [  'clang-20' ]
-        cxx: [ 'clang++-20' ]
+        cc: [  'clang-21' ]
+        cxx: [ 'clang++-21' ]
         include:
           - config: 'generic-gcc'
             cc: 'gcc-14'
@@ -88,18 +88,22 @@ jobs:
           'generic-cxx20',
           'generic-cxx23'
         ]
-        cc: [ 'clang-20' ]
-        cxx: [ 'clang++-20' ]
+        cc: [ 'clang-21' ]
+        cxx: [ 'clang++-21' ]
         include:
           - config: 'generic-gcc-cxx11'
             cc: 'gcc-14'
             cxx: 'g++-14'
-          - config: 'generic-cxx23'
-            cc: 'clang-18'
-            cxx: 'clang++-18'
+          - config: 'generic-cxx26'
+            cc: 'clang-20'
+            cxx: 'clang++-20'
           - config: 'generic-cxx26'
             cc: 'clang-19'
             cxx: 'clang++-19'
+          # Release transition
+          - config: 'generic-cxx23'
+            cc: 'clang-18'
+            cxx: 'clang++-18'
     steps:
       - uses: actions/checkout@v4
       - name: ${{ matrix.config }}
@@ -169,8 +173,8 @@ jobs:
       - name: ${{ matrix.config }}
         run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
         env:
-          CC: clang-20
-          CXX: clang++-20
+          CC: clang-21
+          CXX: clang++-21
       - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
         if: always()
         with:
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 37912e9f8d03e6b..58ff1232e97fac1 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -128,14 +128,14 @@ Libc++ aims to support common compilers that implement the C++11 Standard. In or
 good balance between stability for users and maintenance cost, testing coverage and development
 velocity, libc++ drops support for older compilers as newer ones are released.
 
-============ =============== ========================== =====================
-Compiler     Versions        Restrictions               Support policy
-============ =============== ========================== =====================
-Clang        17, 18, 19-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
-AppleClang   15                                         latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
-Open XL      17.1 (AIX)                                 latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
-GCC          14              In C++11 or later only     latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
-============ =============== ========================== =====================
+============ =================== ========================== =====================
+Compiler     Versions            Restrictions               Support policy
+============ =================== ========================== =====================
+Clang        18, 19, 20, 21-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
+AppleClang   15                                             latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
+Open XL      17.1 (AIX)                                     latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
+GCC          14                  In C++11 or later only     latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
+============ =================== ========================== =====================
 
 Libc++ also supports common platforms and architectures:
 

@llvmbot
Copy link
Member

llvmbot commented Feb 10, 2025

@llvm/pr-subscribers-libcxx

Author: Mark de Wever (mordante)

Changes

Once LLVM 20 is released the clang-18 will no longer be supported.


Full diff: https://github.com/llvm/llvm-project/pull/126564.diff

2 Files Affected:

  • (modified) .github/workflows/libcxx-build-and-test.yaml (+13-9)
  • (modified) libcxx/docs/index.rst (+8-8)
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml
index ee77e83363d37a0..502ab35313dc7a7 100644
--- a/.github/workflows/libcxx-build-and-test.yaml
+++ b/.github/workflows/libcxx-build-and-test.yaml
@@ -48,8 +48,8 @@ jobs:
           'generic-cxx26',
           'generic-modules'
         ]
-        cc: [  'clang-20' ]
-        cxx: [ 'clang++-20' ]
+        cc: [  'clang-21' ]
+        cxx: [ 'clang++-21' ]
         include:
           - config: 'generic-gcc'
             cc: 'gcc-14'
@@ -88,18 +88,22 @@ jobs:
           'generic-cxx20',
           'generic-cxx23'
         ]
-        cc: [ 'clang-20' ]
-        cxx: [ 'clang++-20' ]
+        cc: [ 'clang-21' ]
+        cxx: [ 'clang++-21' ]
         include:
           - config: 'generic-gcc-cxx11'
             cc: 'gcc-14'
             cxx: 'g++-14'
-          - config: 'generic-cxx23'
-            cc: 'clang-18'
-            cxx: 'clang++-18'
+          - config: 'generic-cxx26'
+            cc: 'clang-20'
+            cxx: 'clang++-20'
           - config: 'generic-cxx26'
             cc: 'clang-19'
             cxx: 'clang++-19'
+          # Release transition
+          - config: 'generic-cxx23'
+            cc: 'clang-18'
+            cxx: 'clang++-18'
     steps:
       - uses: actions/checkout@v4
       - name: ${{ matrix.config }}
@@ -169,8 +173,8 @@ jobs:
       - name: ${{ matrix.config }}
         run: libcxx/utils/ci/run-buildbot ${{ matrix.config }}
         env:
-          CC: clang-20
-          CXX: clang++-20
+          CC: clang-21
+          CXX: clang++-21
       - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
         if: always()
         with:
diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst
index 37912e9f8d03e6b..58ff1232e97fac1 100644
--- a/libcxx/docs/index.rst
+++ b/libcxx/docs/index.rst
@@ -128,14 +128,14 @@ Libc++ aims to support common compilers that implement the C++11 Standard. In or
 good balance between stability for users and maintenance cost, testing coverage and development
 velocity, libc++ drops support for older compilers as newer ones are released.
 
-============ =============== ========================== =====================
-Compiler     Versions        Restrictions               Support policy
-============ =============== ========================== =====================
-Clang        17, 18, 19-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
-AppleClang   15                                         latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
-Open XL      17.1 (AIX)                                 latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
-GCC          14              In C++11 or later only     latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
-============ =============== ========================== =====================
+============ =================== ========================== =====================
+Compiler     Versions            Restrictions               Support policy
+============ =================== ========================== =====================
+Clang        18, 19, 20, 21-git                             latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
+AppleClang   15                                             latest stable release per `Xcode's release page <https://developer.apple.com/documentation/xcode-release-notes>`_
+Open XL      17.1 (AIX)                                     latest stable release per `Open XL's documentation page <https://www.ibm.com/docs/en/openxl-c-and-cpp-aix>`_
+GCC          14                  In C++11 or later only     latest stable release per `GCC's release page <https://gcc.gnu.org/releases.html>`_
+============ =================== ========================== =====================
 
 Libc++ also supports common platforms and architectures:
 

Once LLVM 20 is released the clang-18 will no longer be supported.
@mordante mordante force-pushed the review/relase_branch_compiler_updates branch from eb74deb to cb49571 Compare February 11, 2025 18:36
@Zingam
Copy link
Contributor

Zingam commented Feb 12, 2025

@mordante I don't know if this is important. Regarding OpenXL compiler: According to the documentation they've changed the base LLVM version between minor versions: 17.1.2 is based on LLVM17 and 17.1.3 is based on LLVM19
https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=whats-new
https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.3?topic=whats-new

Comment on lines +103 to +106
# Release transition
- config: 'generic-cxx23'
cc: 'clang-18'
cxx: 'clang++-18'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this? I don't think there is much code that requires clang-18-specific workarounds currently and it's really not clear to me when we should drop it otherwise.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we need this. At the moment patches get actively backported to the release branch. Testing clang-18 enures that backporting is easy to do. Once LLVM 20.1.0 is released we can drop clang-18. (We've been doing this is the past too.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree with @mordante, this is easy to keep around for a few weeks and it reduces friction when backporting.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't remember any rules on this and I though it was around for quite a while sometimes. If we agree that it can go after the initial release I'm fine with it, but I really don't want to keep it around for the whole cycle, since that would effectively extend our supported compilers by one version.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's indeed only for the release transition.

============ =================== ========================== =====================
Compiler Versions Restrictions Support policy
============ =================== ========================== =====================
Clang 18, 19, 20, 21-git latest two stable releases per `LLVM's release page <https://releases.llvm.org>`_ and the development version
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we should document that we support more versions than we plan to support when this gets released.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer to keep this as is, and drop 18 when we no longer support it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But we don't support it anymore. This is purely around for ease of migration.

@mordante
Copy link
Member Author

@mordante I don't know if this is important. Regarding OpenXL compiler: According to the documentation they've changed the base LLVM version between minor versions: 17.1.2 is based on LLVM17 and 17.1.3 is based on LLVM19 https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=whats-new https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.3?topic=whats-new

Thanks for the information! I feel this belongs in a separate patch and have it reviewed by somebody of IBM. Are you willing to create such a patch?

@Zingam
Copy link
Contributor

Zingam commented Feb 13, 2025

@mordante I don't know if this is important. Regarding OpenXL compiler: According to the documentation they've changed the base LLVM version between minor versions: 17.1.2 is based on LLVM17 and 17.1.3 is based on LLVM19 https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.2?topic=whats-new https://www.ibm.com/docs/en/openxl-c-and-cpp-aix/17.1.3?topic=whats-new

Thanks for the information! I feel this belongs in a separate patch and have it reviewed by somebody of IBM. Are you willing to create such a patch?

Thanks. Done: #127072

@@ -12,7 +12,7 @@
// UNSUPPORTED: c++03

// TODO: Investigate these failures which break the CI.
// UNSUPPORTED: clang-18, clang-19, clang-20
// UNSUPPORTED: clang-18, clang-19, clang-20, clang-21
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's revive the patch to remove this. It's been broken for 1.5 years. If nobody cares about it, we should get rid of it.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's not been broken. Our CI is. This actually works for every clang version listed here, except in the CI.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why it does not work in our CI?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IIRC the last time it mostly worked except in the optimized build. I've disabled it for everything, since it was already the same day as the LLVM 20 branch and the test was already disabled for all the other versions. We should look into it and maybe just disable it for the optimized build.

@mordante mordante merged commit b22fc43 into llvm:main Feb 18, 2025
79 checks passed
@mordante mordante deleted the review/relase_branch_compiler_updates branch February 18, 2025 18:26
wldfngrs pushed a commit to wldfngrs/llvm-project that referenced this pull request Feb 19, 2025
)

Once LLVM 20 is released the clang-18 will no longer be supported.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github:workflow libc++ libc++ C++ Standard Library. Not GNU libstdc++. Not libc++abi.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants