You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to build the LLVM backend on my M1 Mac I keep running into issues due to how CMake handles the versioning of LLVM.
In particular, the issue is with the lines below:
I have LLVM version 15.0.7 installed but for some reason this is not found by find_package(LLVM 15 QUIET CONFIG). I also tried to change it to find_package(LLVM 15...<16 QUIET CONFIG) but this also failed.
If I simply replace all of these lines by find_package(LLVM REQUIRED CONFIG) then everything works fine, so I would propose doing this change (I would have opened a PR but I don't seem to have permission to do so). Lines 15-18 will still make sure that an appropriate llvm version was selected so it feels like trying out all of these higher versions in hopes of finding the right one seems redundant. I figured this might be in place to make sure that the highest version gets selected in multiple are installed, but as far as I could tell reading online, if no version is specified the highest one will be selected by default anyway.
The text was updated successfully, but these errors were encountered:
We need to have a constraint on the LLVM version we find, that is, we need to enforce that 15 <= LLVM Version <= 18.1. And find_package(LLVM REQUIRED CONFIG) doesn't guarantee that.
The REQUIRED option is also very useful! However, I believe the problem with it is the error message not very useful, that's why we silence the find_package's errors, and we emit our own useful error message here
Well, we don't actually check that the version that we get is less than 18.1. We only check that it is above 15. Maybe we should also add that to the check then.
When I try to build the LLVM backend on my M1 Mac I keep running into issues due to how CMake handles the versioning of LLVM.
In particular, the issue is with the lines below:
llvm-backend/cmake/FindLLVM.cmake
Lines 1 to 14 in b16e56c
I have LLVM version 15.0.7 installed but for some reason this is not found by
find_package(LLVM 15 QUIET CONFIG)
. I also tried to change it tofind_package(LLVM 15...<16 QUIET CONFIG)
but this also failed.If I simply replace all of these lines by
find_package(LLVM REQUIRED CONFIG)
then everything works fine, so I would propose doing this change (I would have opened a PR but I don't seem to have permission to do so). Lines 15-18 will still make sure that an appropriate llvm version was selected so it feels like trying out all of these higher versions in hopes of finding the right one seems redundant. I figured this might be in place to make sure that the highest version gets selected in multiple are installed, but as far as I could tell reading online, if no version is specified the highest one will be selected by default anyway.The text was updated successfully, but these errors were encountered: