- Notifications
You must be signed in to change notification settings - Fork 15.3k
[libc++][CI] Upgrade compiler HEAD version to Clang-20 #108761
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
Conversation
| ✅ With the latest revision this PR passed the Python code formatter. |
2fa7cdb to 7c9c19a Compare libcxx/test/std/utilities/variant/variant.visit.member/robust_against_adl.pass.cpp Show resolved Hide resolved
libcxx/test/std/numerics/numeric.ops/numeric.ops.sat/add_sat.pass.cpp Outdated Show resolved Hide resolved
72a3714 to 4a64f35 Compare Before changing the compiler version in #108761, we first of all need to upgrade the HEAD version to `Clang-20` in the Docker files and push new builder images to the CI.
ed34e6d to 1ba5736 Compare 1ba5736 to 5746ee8 Compare 7161e41 to a8d0ecc Compare | @llvm/pr-subscribers-github-workflow @llvm/pr-subscribers-libcxx Author: Robin Caloudis (robincaloudis) ChangesWhyThe release branch for LLVM 19.x is created ( WhatUpgrade HEAD version to Clang-20 in CI configs. Adjustments for libc++ tests and implementations will be done in follow-up patches. Full diff: https://github.com/llvm/llvm-project/pull/108761.diff 4 Files Affected:
diff --git a/.github/workflows/libcxx-build-and-test.yaml b/.github/workflows/libcxx-build-and-test.yaml index b5e60781e00064..426c40cc2f248c 100644 --- a/.github/workflows/libcxx-build-and-test.yaml +++ b/.github/workflows/libcxx-build-and-test.yaml @@ -38,11 +38,11 @@ env: # LLVM POST-BRANCH bump version # LLVM POST-BRANCH add compiler test for ToT - 1, e.g. "Clang 17" # LLVM RELEASE bump remove compiler ToT - 3, e.g. "Clang 15" - LLVM_HEAD_VERSION: "19" # Used compiler, update POST-BRANCH. - LLVM_PREVIOUS_VERSION: "18" - LLVM_OLDEST_VERSION: "17" + LLVM_HEAD_VERSION: "20" # Used compiler, update POST-BRANCH. + LLVM_PREVIOUS_VERSION: "19" + LLVM_OLDEST_VERSION: "18" GCC_STABLE_VERSION: "13" - LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-19" + LLVM_SYMBOLIZER_PATH: "/usr/bin/llvm-symbolizer-20" CLANG_CRASH_DIAGNOSTICS_DIR: "crash_diagnostics" @@ -59,8 +59,8 @@ jobs: 'generic-cxx26', 'generic-modules' ] - cc: [ 'clang-19' ] - cxx: [ 'clang++-19' ] + cc: [ 'clang-20' ] + cxx: [ 'clang++-20' ] include: - config: 'generic-gcc' cc: 'gcc-14' @@ -97,18 +97,18 @@ jobs: 'generic-cxx20', 'generic-cxx23' ] - cc: [ 'clang-19' ] - cxx: [ 'clang++-19' ] + cc: [ 'clang-20' ] + cxx: [ 'clang++-20' ] include: - config: 'generic-gcc-cxx11' cc: 'gcc-14' cxx: 'g++-14' - - config: 'generic-cxx23' - cc: 'clang-17' - cxx: 'clang++-17' - config: 'generic-cxx26' cc: 'clang-18' cxx: 'clang++-18' + - config: 'generic-cxx26' + cc: 'clang-19' + cxx: 'clang++-19' steps: - uses: actions/checkout@v4 - name: ${{ matrix.config }} @@ -179,8 +179,8 @@ jobs: - name: ${{ matrix.config }} run: libcxx/utils/ci/run-buildbot ${{ matrix.config }} env: - CC: clang-19 - CXX: clang++-19 + CC: clang-20 + CXX: clang++-20 - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 if: always() with: diff --git a/libcxx/docs/index.rst b/libcxx/docs/index.rst index a9610cbb4db3a4..8d076928fe9c7f 100644 --- a/libcxx/docs/index.rst +++ b/libcxx/docs/index.rst @@ -130,7 +130,7 @@ 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 +Clang 18, 19, 20-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>`_ diff --git a/libcxx/include/__configuration/compiler.h b/libcxx/include/__configuration/compiler.h index 80ece22bb50bd6..cf459a0619b23c 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 < 1700 -# warning "Libc++ only supports Clang 17 and later" +# if _LIBCPP_CLANG_VER < 1800 +# warning "Libc++ only supports Clang 18 and later" # endif # elif defined(_LIBCPP_APPLE_CLANG_VER) # if _LIBCPP_APPLE_CLANG_VER < 1500 diff --git a/libcxx/test/libcxx/clang_tidy.gen.py b/libcxx/test/libcxx/clang_tidy.gen.py index 5e84fbbb9913f3..f4f905f579784f 100644 --- a/libcxx/test/libcxx/clang_tidy.gen.py +++ b/libcxx/test/libcxx/clang_tidy.gen.py @@ -18,7 +18,8 @@ from libcxx.header_information import lit_header_restrictions, public_headers for header in public_headers: - print(f"""\ + print( + f"""\ //--- {header}.sh.cpp // REQUIRES: has-clang-tidy @@ -36,4 +37,5 @@ // RUN: %{{clang-tidy}} %s --warnings-as-errors=* -header-filter=.* --config-file=%{{libcxx-dir}}/.clang-tidy -- -Wweak-vtables %{{compile_flags}} -fno-modules #include <{header}> -""") +""" + ) |
| @robincaloudis The failing tests related to |
| I'd like to land #110303 before we tackle any kind of upgrade. That PR will make it a lot easier (and safer) to deploy a new image onto the bots. |
a8d0ecc to bcf249f Compare | Is this PR still relevant: #117429 |
| Thanks for pointing out. I think this PR can be closed. |
Why
The release branch for LLVM 19.x is created (
release/19.x) as anounced here. As a result, the version on main is now20.0.0git. Therefore, we no longer officially supportClang-17, but insteadClang-{18,19,20}.What
Upgrade HEAD version to Clang-20 in CI configs. Adjustments for libc++ tests and implementations will be done in follow-up patches.