llvm: update to 18

This commit is contained in:
oltolm 2024-03-10 12:56:16 +01:00 committed by Megamouse
parent 175aa510c8
commit c40826c140
3 changed files with 11 additions and 15 deletions

View file

@ -36,12 +36,7 @@ if(WITH_LLVM)
set(STATIC_LINK_LLVM ON CACHE BOOL "Link against LLVM statically. This will get set to ON if you build LLVM from the submodule." FORCE)
# now tries to find LLVM again
find_package(LLVM 16.0 CONFIG)
if(NOT LLVM_FOUND)
set(LLVM_DIR "${CMAKE_CURRENT_BINARY_DIR}/llvm_build/lib/cmake/llvm/")
find_package(LLVM 17.0 CONFIG)
endif()
if(NOT LLVM_FOUND)
message(FATAL_ERROR "Couldn't build LLVM from the submodule. You might need to run `git submodule update --init`")
endif()
@ -53,20 +48,16 @@ if(WITH_LLVM)
set(LLVM_DIR ${CMAKE_SOURCE_DIR}/${LLVM_DIR})
endif()
find_package(LLVM 16.0 CONFIG)
if(NOT LLVM_FOUND)
find_package(LLVM 17.0 CONFIG)
endif()
find_package(LLVM CONFIG)
if (NOT LLVM_FOUND)
if (LLVM_VERSION AND LLVM_VERSION_MAJOR LESS 16)
message(FATAL_ERROR "Found LLVM version ${LLVM_VERSION}. Required versions 16...17. \
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
endif()
message(FATAL_ERROR "Can't find LLVM libraries from the CMAKE_PREFIX_PATH path or LLVM_DIR. \
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
endif()
if (LLVM_VERSION VERSION_LESS 16)
message(FATAL_ERROR "Found LLVM version ${LLVM_VERSION}. Required version 16 or above. \
Enable BUILD_LLVM option to build LLVM from included as a git submodule.")
endif()
endif()
if (STATIC_LINK_LLVM)