From f4d9ff6829c5ad0e5a11179f920d76944f26410a Mon Sep 17 00:00:00 2001 From: Xianpeng Shen Date: Thu, 28 Aug 2025 13:23:09 +0000 Subject: [PATCH 1/4] feat: support v21 and drop v8 --- .github/workflows/build.yml | 19 ++-------- README.md | 4 +- ...stdint-string-prior-to-using-uint8_t.patch | 37 ------------------- 3 files changed, 6 insertions(+), 54 deletions(-) delete mode 100644 include-cstdint-string-prior-to-using-uint8_t.patch diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 790b3fd..c87a265 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -20,9 +20,11 @@ jobs: strategy: fail-fast: false matrix: - clang-version: [ 20, 19, 18, 17, 16, 15, 14, 13, 12.0.1, 12, 11, 10, 9, 8] + clang-version: [ 21, 20, 19, 18, 17, 16, 15, 14, 13, 12.0.1, 12, 11, 10, 9] os: [ linux, macosx, windows ] include: + - clang-version: 21 + release: llvm-project-21.1.0.src - clang-version: 20 release: llvm-project-20.1.0.src - clang-version: 19 @@ -51,9 +53,6 @@ jobs: - clang-version: 9 release: llvm-project-9.0.1 extra-cmake-args: '-DLLVM_ENABLE_Z3_SOLVER=OFF' - - clang-version: 8 - release: llvm-project-8.0.1 - extra-cmake-args: '-DCLANG_ANALYZER_ENABLE_Z3_SOLVER=OFF' - os: linux runner: ubuntu-22.04 os-cmake-args: '-DLLVM_BUILD_STATIC=ON -DCMAKE_CXX_FLAGS="-s -flto" ${POSIX_CMAKE_ARGS} ${LINUX_CMAKE_ARGS}' @@ -91,14 +90,6 @@ jobs: # The commit hash of this repository into the clang binaries shell: bash run: curl -L https://github.com/${{ github.repository }}/archive/${{ github.ref }}.tar.gz | tar xvz --strip 1 - - name: Get llvm-project - if: ${{ matrix.clang-version == 8 }} - shell: bash - run: | - version=${RELEASE##llvm-project-} - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/cfe-${version}.src.tar.xz - curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/clang-tools-extra-${version}.src.tar.xz - name: Get llvm-project if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }} shell: bash @@ -123,10 +114,6 @@ jobs: shell: bash run: | tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} - - name: Patch clang-8 includes - if: ${{ matrix.clang-version == 8 }} - shell: bash - run: patch ${{ matrix.release }}/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h include-cstdint-string-prior-to-using-uint8_t.patch - name: Patch trivially-copyable clang 9/10 if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} shell: bash diff --git a/README.md b/README.md index 7db5a83..284d70d 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ Includes **[clang-format](https://clang.llvm.org/docs/ClangFormat.html), [clang- ## Clang Tools Version Support Matrix -| Clang Tools |OS/Version |20|19|18 |17 |16 |15 |14 |13 |12 |11 |10 |9 |8 | +| Clang Tools |OS/Version |21|20|19 |18 |17 |16 |15 |14 |13 |12 |11 |10 |9 | |:------------|-----------|--|--|---|---|---|---|---|---|---|---|---|---|---| |clang-format |Linux 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| | |Window 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️| @@ -27,6 +27,8 @@ Includes **[clang-format](https://clang.llvm.org/docs/ClangFormat.html), [clang- > [!NOTE] > > Remove Support v7 (released in May 2019) by February 2025. +> +> Remove Support v8 (released in July 2019) by September 2025. ## Download diff --git a/include-cstdint-string-prior-to-using-uint8_t.patch b/include-cstdint-string-prior-to-using-uint8_t.patch deleted file mode 100644 index a49281b..0000000 --- a/include-cstdint-string-prior-to-using-uint8_t.patch +++ /dev/null @@ -1,37 +0,0 @@ -From b288d90b39f4b905c02092a9bfcfd6d78f99b191 Mon Sep 17 00:00:00 2001 -From: Than McIntosh -Date: Fri, 19 Jul 2019 13:13:54 +0000 -Subject: [PATCH] [NFC] include cstdint/string prior to using uint8_t/string - -Summary: include proper header prior to use of uint8_t typedef -and std::string. - -Subscribers: llvm-commits - -Reviewers: cherry - -Tags: #llvm - -Differential Revision: https://reviews.llvm.org/D64937 - -llvm-svn: 366572 ---- - llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h | 2 ++ - 1 file changed, 2 insertions(+) - -diff --git a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h -index da9d9d5bfdc0..3d47471f0ef0 100644 ---- a/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h -+++ b/llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h -@@ -16,6 +16,8 @@ - #include "llvm/Demangle/DemangleConfig.h" - #include "llvm/Demangle/StringView.h" - #include -+#include -+#include - - namespace llvm { - namespace itanium_demangle { --- -2.31.1 - From 0db67cd5fa4a3ae271191ad6d2c9870a25244bf9 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Fri, 29 Aug 2025 19:42:59 +0300 Subject: [PATCH 2/4] fix: add --ignore-missing-links to ignore failure --- .github/workflows/build.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c87a265..0aab007 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -96,24 +96,11 @@ jobs: run: | version=${RELEASE##llvm-project-}; version=${version%.src} curl -LO https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/${{ matrix.release }}.tar.xz - - name: Unpack llvm-project - if: ${{ matrix.clang-version < 9 }} - shell: bash - run: | - version=${RELEASE##llvm-project-} - tar xf llvm-${version}.src.tar.xz - tar xf cfe-${version}.src.tar.xz ${{ matrix.extra-tar-args-cfe }} - tar xf clang-tools-extra-${version}.src.tar.xz - mkdir ${{ matrix.release }} - mv llvm-${version}.src ${{ matrix.release }}/llvm - mv cfe-${version}.src ${{ matrix.release }}/clang - mv clang-tools-extra-${version}.src ${{ matrix.release }}/clang-tools-extra - - name: Unpack llvm-project - if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }} shell: bash run: | - tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} + # add --ignore-missing-links to ignore failure on v21 on windows + tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }} - name: Patch trivially-copyable clang 9/10 if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} shell: bash From e3c4820f61182a34501754c8fe0f18c74be548d5 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 16:43:08 +0000 Subject: [PATCH 3/4] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0aab007..ebdfbf3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,7 +99,7 @@ jobs: - name: Unpack llvm-project shell: bash run: | - # add --ignore-missing-links to ignore failure on v21 on windows + # add --ignore-missing-links to ignore failure on v21 on windows tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }} - name: Patch trivially-copyable clang 9/10 if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} From 7b068e48ad19d8ab3d781eb8d53396fbf53287e2 Mon Sep 17 00:00:00 2001 From: shenxianpeng Date: Fri, 29 Aug 2025 19:55:56 +0300 Subject: [PATCH 4/4] fix: ignore failure on windows for v21 --- .github/workflows/build.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ebdfbf3..a879edb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,8 +99,8 @@ jobs: - name: Unpack llvm-project shell: bash run: | - # add --ignore-missing-links to ignore failure on v21 on windows - tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }} + # ignore failure on v21 on windows + tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} || true - name: Patch trivially-copyable clang 9/10 if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} shell: bash