Implement CMake LLVM version overrides; add hard MAX and MIN versions#692
Implement CMake LLVM version overrides; add hard MAX and MIN versions#692val-ms merged 2 commits intoCisco-Talos:mainfrom
Conversation
val-ms
left a comment
There was a problem hiding this comment.
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
Somehow the changes from Cisco-Talos#692 did not come with a doc update. The cap at version 13 is given from Cisco-Talos#574. I did not try to build it with LLVM 14, so I don't know whether it truly doesn't compile or simply fails due to the CMake thing.
Fixes #691
-DLLVM_ROOT_DIRand-DLLVM_FIND_VERSIONSTATUSrather thanNOTICELLVM_MAX_VERset to13.0.1based on #574.