Skip to content

Conversation

@shenxianpeng
Copy link
Contributor

@shenxianpeng shenxianpeng commented Aug 28, 2025

closes #63

Summary by CodeRabbit

  • New Features

    • Expanded compiler compatibility to include Clang 21.
  • Bug Fixes

    • Fixed build issues by adding missing standard header includes.
    • Improved archive extraction to avoid Windows extraction failures for the newest toolchain.
  • Documentation

    • Updated version support matrix to add Clang 21 and remove Clang 8.
    • Added timeline note for removing legacy version support.
  • Chores

    • Updated CI to test against Clang 21 and removed Clang 8 from the matrix.

@shenxianpeng shenxianpeng added enhancement New feature or request breaking This is a breaking changes labels Aug 28, 2025
@shenxianpeng shenxianpeng requested a review from Copilot August 28, 2025 13:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for Clang v21 and removes support for Clang v8, updating the version support matrix and build configurations accordingly.

  • Adds Clang v21 support with corresponding build configuration
  • Removes Clang v8 support from CI workflows and documentation
  • Updates support deprecation timeline to announce v8 removal by September 2025

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
include-cstdint-string-prior-to-using-uint8_t.patch Removes patch file that was specific to Clang v8 compilation issues
README.md Updates version support matrix to include v21 and removes v8, adds deprecation notice
.github/workflows/build.yml Adds v21 build configuration and removes v8-specific build steps and patches

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

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.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Aug 28, 2025

Note

Other AI code review bot(s) detected

CodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review.

Walkthrough

CI workflow updated to add clang 21 and remove clang 8, consolidating llvm-project download/unpack logic and tar extraction guards; README support matrix updated to drop v8 and note its planned removal; a Demangle header gained #include <cstdint> and #include <string>.

Changes

Cohort / File(s) Summary
CI workflow matrix and steps
\.github/workflows/build.yml
Added clang-version: 21 and an include entry for llvm-project-21.1.0.src; removed clang-version: 8 and its specialized steps/patch; consolidated "Get llvm-project" and "Unpack llvm-project" into single steps for matrix entries >=9 or == "12.0.1" that download/extract matrix.release; added --ignore-missing-links/guard for Windows v21 tar extraction; removed clang-8 specific patch.
Documentation updates
README.md
Updated Clang Tools Version Support Matrix to include v21 and drop v8; added note to remove v8 support by September 2025 (v7 removal note retained).
Header include patch
include-cstdint-string-prior-to-using-uint8_t.patch
Inserted #include <cstdint> and #include <string> into llvm/include/llvm/Demangle/MicrosoftDemangleNodes.h (after #include <array>) so uint8_t and std::string are declared before use.

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor GH as GitHub Actions
  participant Workflow as build.yml
  participant Matrix as clang-version job matrix
  participant Fetch as Get/Unpack llvm-project
  participant Build as build & test steps

  GH->>Workflow: trigger CI
  Workflow->>Matrix: expand clang versions (21,20,...,9,12.0.1)
  loop per clang-version
    Matrix->>Fetch: if version >= 9 or == "12.0.1"
    Fetch->>Fetch: download release tarball (matrix.release)
    alt Windows & clang-21
      Fetch->>Fetch: extract with tar --ignore-missing-links (ignore failures)
    else
      Fetch->>Fetch: extract archive normally
    end
    Fetch->>Build: toolchain prepared
    Build->>Build: compile & test
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/support-clang-v20

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore or @coderabbit ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
README.md (1)

15-25: Typo: “Window 64” → “Windows 64” (three occurrences).

Fix in all tool rows for consistency and professionalism.

Apply:

-|             |Window 64  |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|
+|             |Windows 64 |✔️|✔️|✔️ |✔️|✔️|✔️ |✔️|✔️ |✔️ |✔️|✔️| ✔️|✔️|

Repeat for clang-tidy, clang-query, and clang-apply-replacements rows.

.github/workflows/build.yml (1)

71-73: Bump Windows build C++ standard to C++17
The /std:c++14 flag forces CMAKE_CXX_STANDARD=14, but LLVM requires at least C++17 (CMAKE_CXX_STANDARD 17+) and will fatal-error if lower; change to /std:c++17 or drop the flag to let LLVM set it (github.com, reviews.llvm.org)

🧹 Nitpick comments (4)
README.md (1)

30-31: Note text and table are inconsistent about v8 timing.

CI and this table already dropped v8 now (August 2025). Adjust to past tense with the exact date to avoid confusion.

-> Remove Support v8 (released in July 2019) by September 2025.
+> Removed support for v8 (released in July 2019) in August 2025.

Optionally also update the v7 line to past tense if removal already happened.

.github/workflows/build.yml (3)

100-112: Dead path for <9 can be dropped.

Matrix no longer builds <9, so this unpack step will never run. Remove for simplicity and to avoid stale variables like extra-tar-args-cfe.

-    - 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

Also remove windows matrix key extra-tar-args-cfe if unused elsewhere.


88-99: If the new Demangle header patch is required, it’s not applied anywhere.

AI summary mentions include-cstdint-string-prior-to-using-uint8_t.patch, but there’s no patch step. Add a guarded step before configure if needed.

+    - name: Patch Demangle includes (if needed)
+      if: ${{ matrix.clang-version >= 9 }}
+      shell: bash
+      run: |
+        if [ -f include-cstdint-string-prior-to-using-uint8_t.patch ]; then
+          patch -p0 < include-cstdint-string-prior-to-using-uint8_t.patch
+        fi

Please adjust -p level to match the patch.


176-181: Artifact naming and retention OK; consider bumping retention if downstream users need >24h.

Optional.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 9ab671e and f4d9ff6.

📒 Files selected for processing (3)
  • .github/workflows/build.yml (1 hunks)
  • README.md (2 hunks)
  • include-cstdint-string-prior-to-using-uint8_t.patch (0 hunks)
💤 Files with no reviewable changes (1)
  • include-cstdint-string-prior-to-using-uint8_t.patch
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (20)
  • GitHub Check: build (11, linux)
  • GitHub Check: build (12.0.1, windows)
  • GitHub Check: build (13, macosx)
  • GitHub Check: build (12.0.1, macosx)
  • GitHub Check: build (12, windows)
  • GitHub Check: build (15, windows)
  • GitHub Check: build (13, linux)
  • GitHub Check: build (16, linux)
  • GitHub Check: build (15, linux)
  • GitHub Check: build (17, windows)
  • GitHub Check: build (18, linux)
  • GitHub Check: build (19, windows)
  • GitHub Check: build (17, macosx)
  • GitHub Check: build (18, macosx)
  • GitHub Check: build (18, windows)
  • GitHub Check: build (20, windows)
  • GitHub Check: build (19, linux)
  • GitHub Check: build (21, macosx)
  • GitHub Check: build (21, linux)
  • GitHub Check: build (20, linux)
🔇 Additional comments (5)
.github/workflows/build.yml (5)

23-23: Add clang 21 to matrix — good.

Coverage now spans 21→9; aligns with the stated support window.


31-31: 19.x bump matches current 19.1 line — good.

No action.


121-131: macOS CMake implicit link patch runs on all macOS versions — OK.

No change required; just noting continued applicability with 21.


140-156: Smoke tests split per OS — good coverage.

LGTM.


26-27: Tag llvmorg-21.1.0 verified: HTTP 200 confirms the llvm-project-21.1.0.src.tar.xz release is valid.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/build.yml (1)

50-55: Broken download/unpack for clang 10/9: missing “.src” suffix.

The URL and extracted top-level dir rely on matrix.release. For 10/9 the suffix is missing, causing 404/tar errors.

-          - clang-version: 10
-            release: llvm-project-10.0.1
+          - clang-version: 10
+            release: llvm-project-10.0.1.src
             extra-cmake-args: '-DLLVM_ENABLE_Z3_SOLVER=OFF'
-          - clang-version: 9
-            release: llvm-project-9.0.1
+          - clang-version: 9
+            release: llvm-project-9.0.1.src
             extra-cmake-args: '-DLLVM_ENABLE_Z3_SOLVER=OFF'
♻️ Duplicate comments (1)
.github/workflows/build.yml (1)

94-99: Fix type-mixed condition; it can error when clang-version is '12.0.1'.

GitHub expressions may fail evaluating 'string >= number' even with ||. v8 is gone, so this condition is now redundant—make the step unconditional (simplest) or rework to a string-safe check.

-    - name: Get llvm-project
-      if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
+    - name: Get llvm-project
       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
🧹 Nitpick comments (2)
.github/workflows/build.yml (2)

23-23: v21 added to matrix — looks good. Consider normalizing version types.

LGTM for adding 21. Optional: quote all versions in the list to keep them consistently typed as strings and avoid type-mixing elsewhere.

-        clang-version: [ 21, 20, 19, 18, 17, 16, 15, 14, 13, 12.0.1, 12, 11, 10, 9]
+        clang-version: [ '21', '20', '19', '18', '17', '16', '15', '14', '13', '12.0.1', '12', '11', '10', '9' ]

78-78: Remove unused key extra-tar-args-cfe.

This matrix var isn’t referenced; drop it to reduce confusion.

-            extra-tar-args-cfe: '--exclude=cfe-${version}.src/test/Driver/Inputs/*'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f4d9ff6 and e3c4820.

📒 Files selected for processing (1)
  • .github/workflows/build.yml (2 hunks)
🔇 Additional comments (1)
.github/workflows/build.yml (1)

26-27: Release tag llvmorg-21.1.0 verified. Download URL returns HTTP 200, confirming the llvm-project-21.1.0.src asset exists upstream.

Comment on lines 102 to 103
# 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

♻️ Duplicate comments (2)
.github/workflows/build.yml (2)

23-55: Quote all clang-version entries to avoid type-mismatch in expressions.

Mixing numeric (21, 20, …) and string ('12.0.1') versions makes comparisons brittle. Quote all versions for consistent typing and to prevent expression errors downstream. This also resolves the concern already raised about numeric comparisons failing.

-        clang-version: [ 21, 20, 19, 18, 17, 16, 15, 14, 13, 12.0.1, 12, 11, 10, 9]
+        clang-version: [ '21', '20', '19', '18', '17', '16', '15', '14', '13', '12.0.1', '12', '11', '10', '9' ]
@@
-          - clang-version: 21
+          - clang-version: '21'
             release: llvm-project-21.1.0.src
-          - clang-version: 20
+          - clang-version: '20'
             release: llvm-project-20.1.0.src
-          - clang-version: 19
+          - clang-version: '19'
             release: llvm-project-19.1.0.src
-          - clang-version: 18
+          - clang-version: '18'
             release: llvm-project-18.1.5.src
-          - clang-version: 17
+          - clang-version: '17'
             release: llvm-project-17.0.4.src
-          - clang-version: 16
+          - clang-version: '16'
             release: llvm-project-16.0.3.src
-          - clang-version: 15
+          - clang-version: '15'
             release: llvm-project-15.0.2.src
-          - clang-version: 14
+          - clang-version: '14'
             release: llvm-project-14.0.0.src
-          - clang-version: 13
+          - clang-version: '13'
             release: llvm-project-13.0.0.src
-          - clang-version: 12.0.1
+          - clang-version: '12.0.1'
             release: llvm-project-12.0.1.src
-          - clang-version: 12
+          - clang-version: '12'
             release: llvm-project-12.0.0.src
-          - clang-version: 11
+          - clang-version: '11'
             release: llvm-project-11.1.0.src
-          - clang-version: 10
+          - clang-version: '10'
             release: llvm-project-10.0.1
             extra-cmake-args: '-DLLVM_ENABLE_Z3_SOLVER=OFF'
-          - clang-version: 9
+          - clang-version: '9'
             release: llvm-project-9.0.1
             extra-cmake-args: '-DLLVM_ENABLE_Z3_SOLVER=OFF'

94-99: Remove the brittle numeric comparison in the Get llvm-project step.

Now that v8 is dropped, this guard is unnecessary and error-prone with mixed-type versions. Just always download.

-    - name: Get llvm-project
-      if: ${{ matrix.clang-version >= 9 || matrix.clang-version == '12.0.1' }}
+    - name: Get llvm-project
       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
🧹 Nitpick comments (1)
.github/workflows/build.yml (1)

77-79: Remove unused matrix key extra-tar-args-cfe (or wire it up).

extra-tar-args-cfe is defined but never referenced. Drop it to reduce confusion or integrate it where intended.

-            extra-tar-args-cfe: '--exclude=cfe-${version}.src/test/Driver/Inputs/*'
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between e3c4820 and 7b068e4.

📒 Files selected for processing (1)
  • .github/workflows/build.yml (2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build (19, linux)
  • GitHub Check: build (21, macosx)
  • GitHub Check: build (20, linux)

Comment on lines +102 to +103
# ignore failure on v21 on windows
tar xf ${{ matrix.release }}.tar.xz ${{ matrix.extra-tar-args }} || true
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Don’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 || true and only add special handling on Windows. Also scope any GNU tar flags to Windows (not macOS) to avoid bsdtar errors.

-        # 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 }}
+        fi

If 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.yml

Length of output: 5303


Make Windows-only tar fallback explicit and scope GNU-only flags

  • Remove the unconditional || true on the tar command and wrap it in a shell conditional on matrix.os == 'windows' so extraction failures on macOS/Linux surface.
  • Ensure any GNU-specific flags in matrix.extra-tar-args are only declared for Windows in your matrix to avoid bsdtar errors on macOS.

Example refactor in .github/workflows/build.yml:

- 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 }}
    fi

Optional 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
In .github/workflows/build.yml around lines 102-103, remove the unconditional
"|| true" from the tar extraction and instead make the fallback Windows-only by
wrapping the tar command in a shell conditional that checks if matrix.os ==
'windows'; on Windows keep the "|| true" (or the 7-Zip retry) so failures are
masked there, while on non-Windows run tar without "|| true" so extraction
failures surface. Also ensure any GNU-specific flags contained in
matrix.extra-tar-args are only set for the Windows matrix entries to avoid
bsdtar errors on macOS/Linux.

@shenxianpeng shenxianpeng merged commit 6e61295 into master Aug 29, 2025
40 of 47 checks passed
@shenxianpeng shenxianpeng deleted the feature/support-clang-v20 branch August 29, 2025 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking This is a breaking changes enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

clang-tools v21 is offical release

2 participants