← Back to Pull requests

Fix LLVM_VERSION_SUFFIX handling for release branches #210865

Open
dingcyrus opened this pull request with 37 lines diff across 2 files
View on GitHub
dingcyrus dingcyrus commented on Jul 21, 2026 02:35 UTC
Author

When bumping a version string like '23.1.0-rc1', packaging.version.parse() returns version.pre as a tuple ('rc', 1), which was being written directly into LLVMVersion.cmake as-is, producing invalid CMake:

set(LLVM_VERSION_SUFFIX ('rc', 1))

instead of the expected:

set(LLVM_VERSION_SUFFIX -rc1)

Fix the bump-version.py script to properly convert the version.pre tuple to a properly formatted suffix string.

Also update the release documentation (HowToReleaseLLVM.rst) to include bumping LLVM_VERSION_SUFFIX as an explicit step when tagging release candidates and the final release. This prevents the suffix from staying as 'git' on release branches, which otherwise causes builds to produce incorrectly-named libraries like libLLVM-23git.so.

AI assistance was used for code review analysis

Fixes: https://github.com/llvm/llvm-project/issues/210691

Diff: 37 lines (+34 / -3) across 2 files Reviewer: tstellar Review duration: 196142m
All Vouch review confidence checks passed
Residual risk 0.11 = Change Risk (0.33) × (1 − Review Confidence (0.66)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.33 · 37 lines diff across 2 files
0.33
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.57 · 3 substantive comment(s)
0.57
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
65%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.218
Real PR Conversation Timeline
5 items
h-vetinari h-vetinari commented on Jul 21, 2026 07:41 UTC
Contributor

This needs to target the release/23.x branch, not main.

dingcyrus dingcyrus commented on Jul 21, 2026 07:59 UTC
Author

This needs to target the release/23.x branch, not main.

Thanks for the review! The bump-version.py fix is a general tooling bug — version.pre returns a tuple for ANY version string containing -rcN, so this would affect future releases (24.x, 25.x, etc.) as well. The doc update in HowToReleaseLLVM.rst is also forward-looking for all future release managers.

The immediate issue on release/23.x was already fixed manually in acdf320b78fc ("Fix bumping of version to 23.1.0-rc1"). These changes on main are to prevent the same bug from recurring in the next release cycle.

I'm happy to create a separate backport PR targeting release/23.x if you think the script fix should also land there — just let me know!

h-vetinari h-vetinari commented on Jul 21, 2026 08:06 UTC
Contributor

Ah, sorry, I hadn't noticed that. That's great! Carry on then. :)

tstellar tstellar approved these changes on Aug 14, 2026 07:40 UTC
Approved Reviewer

Approved these changes.

Reviewers
Assignees
dingcyrus dingcyrus
Labels
risk: low confidence: 65.5% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 33.2% (LOW) · Higher = larger blast radius
33.2%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 65.5% · Lower = rushed or shallow review
65.5%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 11.4% · Safe to merge
11.4%