Commit 70c9c12d authored by Matheus Marchini's avatar Matheus Marchini

build: fix linking against monolithic LLVM

Fixes: https://github.com/iovisor/bpftrace/issues/251
parent 21bc520c
...@@ -36,7 +36,7 @@ if (STATIC_LINKING) ...@@ -36,7 +36,7 @@ if (STATIC_LINKING)
target_link_libraries(ast ${clang_libs}) target_link_libraries(ast ${clang_libs})
target_link_libraries(ast ${llvm_libs}) target_link_libraries(ast ${llvm_libs})
else() else()
find_library(found_LLVM LLVM) find_library(found_LLVM LLVM HINTS ${LLVM_LIBRARY_DIRS})
if(found_LLVM) if(found_LLVM)
target_link_libraries(ast LLVM) target_link_libraries(ast LLVM)
else() else()
...@@ -44,6 +44,5 @@ else() ...@@ -44,6 +44,5 @@ else()
llvm_expand_dependencies(llvm_libs ${_llvm_libs}) llvm_expand_dependencies(llvm_libs ${_llvm_libs})
target_link_libraries(ast ${llvm_libs}) target_link_libraries(ast ${llvm_libs})
endif() endif()
target_link_libraries(ast libclang) target_link_libraries(ast libclang)
endif() endif()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment