cmake: Adapt llvmorg-16-init-15123-gf09cf34d0062 (LLVMTargetParser)

This commit is contained in:
Fangrui Song 2023-01-14 21:37:44 -08:00
parent 6dc564f2a8
commit 2468edc0b3

View File

@ -94,8 +94,10 @@ endif()
if(LLVM_LINK_LLVM_DYLIB) if(LLVM_LINK_LLVM_DYLIB)
target_link_libraries(ccls PRIVATE LLVM) target_link_libraries(ccls PRIVATE LLVM)
else() else()
# In llvm 7, clangDriver headers reference LLVMOption
target_link_libraries(ccls PRIVATE LLVMOption LLVMSupport) target_link_libraries(ccls PRIVATE LLVMOption LLVMSupport)
if(LLVM_VERSION_MAJOR GREATER_EQUAL 16) # llvmorg-16-init-15123-gf09cf34d0062
target_link_libraries(ccls PRIVATE LLVMTargetParser)
endif()
endif() endif()
if(NOT LLVM_ENABLE_RTTI) if(NOT LLVM_ENABLE_RTTI)