Fix LLVM_VERSION_SUFFIX handling for release branches #210865
This needs to target the release/23.x branch, not main.
This needs to target therelease/23.xbranch, notmain.
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!
Ah, sorry, I hadn't noticed that. That's great! Carry on then. :)
Approved these changes.
tstellar
dingcyrus
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