From 2468edc0b305b35856694349642eb2c912f205fa Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 14 Jan 2023 21:37:44 -0800 Subject: [PATCH] cmake: Adapt llvmorg-16-init-15123-gf09cf34d0062 (LLVMTargetParser) --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d43279ab..aafae5d9 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -94,8 +94,10 @@ endif() if(LLVM_LINK_LLVM_DYLIB) target_link_libraries(ccls PRIVATE LLVM) else() - # In llvm 7, clangDriver headers reference LLVMOption 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() if(NOT LLVM_ENABLE_RTTI)