Skip to content

feat: add llvm-cov, llvm-profdata, llvm-symbolizer, clang-scan-deps#118

Merged
shenxianpeng merged 13 commits into
masterfrom
feature/add-more-tools
Jun 26, 2026
Merged

feat: add llvm-cov, llvm-profdata, llvm-symbolizer, clang-scan-deps#118
shenxianpeng merged 13 commits into
masterfrom
feature/add-more-tools

Conversation

@shenxianpeng

@shenxianpeng shenxianpeng commented Jun 24, 2026

Copy link
Copy Markdown
Member

Add four new tools to the static binary build pipeline:

  • llvm-cov: code coverage reporting
  • llvm-profdata: profile data manipulation (merge, show, etc.)
  • llvm-symbolizer: address-to-source-line symbolization
  • clang-scan-deps: C/C++ module and header dependency scanning

Changes:

  • build.py: add tools to TOOLS list with version constraints (clang-scan-deps requires LLVM 12+, clang-include-cleaner requires 18+); add end-to-end smoke tests for each new tool
  • build.yml: update upload-artifact pattern to include llvm-* binaries
  • release.py: expand versions.json with tools list (and per-tool min_llvm_version constraints) and supported platforms — this is now the single source of truth for all downstream channels
  • README.md: update description, support matrix with 4 new tools, and versions.json documentation
  • CONTRIBUTING.md: update tools list and versions.json description
  • scoop-examples/: add manifest examples for the 4 new tools; update README with new tool table

Summary by CodeRabbit

  • New Features
    • Expanded the set of shipped tools to include additional LLVM utilities.
    • Added richer release metadata, including supported platforms and tool version requirements.
  • Bug Fixes
    • Improved tool compatibility checks for older LLVM releases.
    • Updated Windows verification steps and pinned macOS ARM runners for more consistent CI behavior.
  • Documentation
    • Clarified the project scope and updated download instructions to reflect the latest release metadata format.

shenxianpeng and others added 13 commits June 24, 2026 17:43
Add four new tools to the static binary build pipeline:

- llvm-cov: code coverage reporting
- llvm-profdata: profile data manipulation (merge, show, etc.)
- llvm-symbolizer: address-to-source-line symbolization
- clang-scan-deps: C/C++ module and header dependency scanning

Changes:
- build.py: add tools to TOOLS list with version constraints
  (clang-scan-deps requires LLVM 12+, clang-include-cleaner requires 18+);
  add end-to-end smoke tests for each new tool
- build.yml: update upload-artifact pattern to include llvm-* binaries
- release.py: expand versions.json with tools list (and per-tool
  min_llvm_version constraints) and supported platforms — this is now
  the single source of truth for all downstream channels
- README.md: update description, support matrix with 4 new tools,
  and versions.json documentation
- CONTRIBUTING.md: update tools list and versions.json description
- scoop-examples/: add manifest examples for the 4 new tools;
  update README with new tool table
…add clang build target for smoke tests

Two issues were causing all 15 CI build jobs to fail:

1. llvm-profdata on LLVM < 17 uses a subcommand interface and does not
   support the --version flag (LLVM 17+ added explicit handling in
   llvm-profdata.cpp main()). Skip --version for this specific case
   and verify the binary loads by running it with no args instead.

2. Functional smoke tests (llvm-profdata, llvm-cov, llvm-symbolizer)
   need the clang compiler driver to compile short C programs, but
   clang was never in the cmake build targets list (only clang-* tools
   were). Conditionally add 'clang' to cmake --target list when needed.
The smoke tests for llvm-profdata and llvm-cov compile C programs with
-fprofile-instr-generate, which requires libclang_rt.profile-*.a from
compiler-rt. Since compiler-rt is not enabled in the cmake configuration,
these tests fail on all platforms.

Add _check_profile_runtime() helper that probes whether the runtime is
available before running the instrumented compilation. When unavailable:
- llvm-profdata: test merge/show argument parsing with a minimal
  (dummy) .profraw instead of a real instrumented binary
- llvm-cov: skip gracefully with an info message
macOS ARM64 CI jobs were failing with GCC 14 compiler errors against
Xcode 26.5 SDK headers (mach/message.h) that use xnu_static_assert
macros not understood by GCC in C++ mode.

macos-latest recently switched to macOS 15 + Xcode 26.5 which ships
these incompatible headers. Pin to macos-14 which has a stable, older
Xcode version compatible with GCC 14.
The test-release steps (both bash and PowerShell) run --version on
downloaded artifacts. llvm-profdata on LLVM < 17 doesn't support
--version. Detect the LLVM version from the filename and skip --version
when < 17, verifying the binary by running with no args instead.
The build.py already runs --version (or equivalent) smoke tests on every
built tool during the build step. The test-release step was repeating
the same verification, adding complexity and maintenance burden for no
additional safety. Keep test-release as a dependency gate only.
@shenxianpeng shenxianpeng added the enhancement New feature or request label Jun 26, 2026
@shenxianpeng shenxianpeng marked this pull request as ready for review June 26, 2026 07:09
@shenxianpeng shenxianpeng merged commit 2698447 into master Jun 26, 2026
79 of 80 checks passed
@shenxianpeng shenxianpeng deleted the feature/add-more-tools branch June 26, 2026 07:09
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 94d8aec2-1a17-477e-a9b8-893b81572b4c

📥 Commits

Reviewing files that changed from the base of the PR and between c0edcde and ca56188.

📒 Files selected for processing (5)
  • .github/workflows/build.yml
  • CONTRIBUTING.md
  • README.md
  • build.py
  • release.py

Walkthrough

The PR expands the tracked LLVM/Clang tool set, adds version-aware tool metadata and filtering, and updates CI workflow runner selection, artifact handling, and Windows verification steps.

Changes

Tooling, metadata, and CI workflow updates

Layer / File(s) Summary
Tool inventory and version gates
build.py, README.md, CONTRIBUTING.md
Adds llvm-cov, llvm-profdata, llvm-symbolizer, and clang-scan-deps to the tracked tool set, filters unsupported tools by LLVM version, and updates the project text that describes the tool scope.
versions.json metadata
release.py, README.md
Emits per-tool metadata and a fixed platform list in versions.json, and updates the README description of that JSON contract.
Download and artifact upload
build.py, .github/workflows/build.yml
Switches the helper download path to urlretrieve and changes the build job’s source download and artifact upload configuration.
Runner pinning and verification
.github/workflows/build.yml, build.py
Pins macOS arm64 runners, changes Windows file listing, removes the Windows smoke test, and adds the older llvm-profdata usage check.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant