Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork33.7k
Closed
Description
Bug report
Bug description:
I initially encounteredthis build issue on Gentoo.
Currently the regex inTools/jit/_llvm.py only allows strings of the formversion MAJOR.MINOR.PATCH
_LLVM_VERSION_PATTERN=re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\s+")
However if LLVM was built with e.g.-DLLVM_VERSION_SUFFIX=+libcxx (as is the case on Gentoo)clang --version would returnclang version 18.1.7+libcxx which is a valid version but doesn't match.
My proposed fix would be to simply allow a non-whitespace string of arbitrary length after the version, i.e.:
_LLVM_VERSION_PATTERN=re.compile(rf"version\s+{_LLVM_VERSION}\.\d+\.\d+\S*\s+")
CPython versions tested on:
3.13
Operating systems tested on:
Linux