-
Notifications
You must be signed in to change notification settings - Fork 2
feat: support v21 and drop v8 #64
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
Changes from all commits
f4d9ff6
0db67cd
e3c4820
7b068e4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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,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' }} | ||
| 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 | ||
| # ignore failure on v21 on windows | ||
| tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} || true | ||
|
Comment on lines
+102
to
+103
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Verification agent 🧩 Analysis chainDon’t mask extraction failures; make Windows-only fallback explicit. The comment says “ignore failure on v21 on windows,” but the command ignores all failures on all OSes. Remove - # ignore failure on v21 on windows
- tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} || true
+ # Use Windows-only fallback; avoid GNU-only flags on macOS (bsdtar).
+ if [[ "${{ matrix.os }}" == "windows" || "${{ runner.os }}" == "Windows" ]]; then
+ # If needed, append GNU-only flags here; verify support on the runner.
+ tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }}
+ else
+ tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }}
+ fiIf Windows extraction still fails for v21, consider a guarded retry with 7-Zip: + if [[ "${{ matrix.os }}" == "windows" || "${{ runner.os }}" == "Windows" ]]; then
+ tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }} || {
+ echo "tar failed; retrying with 7z";
+ 7z x "${{ matrix.release }}.tar.xz" -y && 7z x "${{ matrix.release }}.tar" -y
+ }
+ fi🏁 Script executed: #!/bin/bash
# Show context around lines 80-120 in build.yml
sed -n '80,120p' .github/workflows/build.yml
# Search for definition of matrix.os
rg -nP '\bmatrix\.os\b' -C3 .github/workflows/build.yml
# Search for runner.os usage
rg -nP '\brunner\.os\b' -C3 .github/workflows/build.ymlLength of output: 5303 Make Windows-only tar fallback explicit and scope GNU-only flags
Example refactor in - name: Unpack llvm-project
shell: bash
run: |
if [[ "${{ matrix.os }}" == "windows" ]]; then
# mask failures only on Windows
tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }} || true
else
tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }}
fiOptional Windows 7-Zip retry for v21 failures: if [[ "${{ matrix.os }}" == "windows" ]]; then
tar xf "${{ matrix.release }}.tar.xz" ${{ matrix.extra-tar-args }} || {
echo "tar failed; retrying with 7z";
7z x "${{ matrix.release }}.tar.xz" -y && 7z x "${{ matrix.release }}.tar" -y
}
fi🤖 Prompt for AI Agents |
||
| - name: Patch trivially-copyable clang 9/10 | ||
| if: ${{ ( matrix.clang-version == 9 || matrix.clang-version == 10 ) && matrix.os == 'windows' }} | ||
| shell: bash | ||
|
|
||
This file was deleted.
There was a problem hiding this comment.
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 >= 9will 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.