Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 5 additions & 31 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}'
Expand Down Expand Up @@ -91,42 +90,17 @@ 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' }}
Copy link

Copilot AI Aug 28, 2025

Choose a reason for hiding this comment

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

The condition matrix.clang-version >= 9 will fail for version 21 because it's comparing a number to a string. Version 21 should be included in this condition, but the comparison logic needs to handle string versions properly or use numeric comparison.

Copilot uses AI. Check for mistakes.
shell: bash
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 }}
- 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
# add --ignore-missing-links to ignore failure on v21 on windows
tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }}
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue

Scope --ignore-missing-links to Windows only to avoid macOS bsdtar errors.

bsdtar on macOS doesn’t support this GNU tar flag; keep it Windows-only.

-        # add --ignore-missing-links to ignore failure on v21 on windows
-        tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }}
+        # add --ignore-missing-links to ignore failure on v21 on Windows
+        if [[ "${{ matrix.os }}" == "windows" || "${{ runner.os }}" == "Windows" ]]; then
+          tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }}
+        else
+          tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }}
+        fi
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
# add --ignore-missing-links to ignore failure on v21 on windows
tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }}
# add --ignore-missing-links to ignore failure on v21 on Windows
if [[ "${{ matrix.os }}" == "windows" || "${{ runner.os }}" == "Windows" ]]; then
tar xf ${{ matrix.release }}.tar.xz --ignore-missing-links ${{ matrix.extra-tar-args }}
else
tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }}
fi
🤖 Prompt for AI Agents
.github/workflows/build.yml around lines 102 to 103: the tar extraction adds the
GNU-only --ignore-missing-links flag unconditionally which breaks bsdtar on
macOS; change the workflow so that --ignore-missing-links is appended only when
running on Windows (e.g., guard it with a conditional on matrix.os == 'windows'
or build the tar command from a variable that includes the flag only for
Windows) so macOS runs use the plain tar extraction without that flag.

- name: Patch trivially-copyable clang 9/10
if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }}
shell: bash
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
Expand All @@ -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

Expand Down
37 changes: 0 additions & 37 deletions include-cstdint-string-prior-to-using-uint8_t.patch

This file was deleted.

Loading