New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement CMake LLVM version overrides; add hard MAX and MIN versions #692
Implement CMake LLVM version overrides; add hard MAX and MIN versions #692
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR. Nice catch with info -> STATUS and "FATAL" -> "FATAL_ERROR".
I haven't tested this yet but it reads well. I just have a few changes to request.
e8629a5
to
14fb536
Compare
|
Feedback addressed - I appreciate the prompt response. Seems fine from my end. I don't have the infra available right now to test against versions of LLVM that need
Someone on your team will need to review your CMakelists files (or ideally migrate to something more sane, like Meson). The minimum version for CMake across the board should be at least I note that I feel like this is desirable behaviour, even if it just encourages users to set This shouldn't impact most users though - it's unusual to see multi-impl LLVM on distros outside of Gentoo anyway, and the ebuild for clamav there has been updated to set both |
14fb536
to
4e7da8b
Compare
The minimum CMake versions for ClamAV are already 3.16 (windows) and 3.14 (others) https://github.com/Cisco-Talos/clamav/blob/main/CMakeLists.txt#L4-L8 Using a feature from 3.7 shouldn't be a problem.
Our In case it interests you, there is another/newer mechanism for finding LLVM using LLVMConfig.cmake files installed to under |
I looked at that for far too long yesterday. Those were the strings I replaced. Why I parsed 3.16 as < 3.7 I will never know. :) |
|
Is this ready for re-review? |
|
Should be! While I haven't touched Additionally it's probably only an issue on multi-impl systems where it appears that the highest version is preferred regardless of what's specified. I've had this patch applied to the Gentoo |
4e7da8b
to
3cb9998
Compare
Fixes #691
-DLLVM_ROOT_DIRand-DLLVM_FIND_VERSIONSTATUSrather thanNOTICELLVM_MAX_VERset to13.0.1based on #574.