Skip to content

Commit

Permalink
choose dynamic link when building on Arch Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
x14ngch3n committed Jul 24, 2024
1 parent e035645 commit e0d525f
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ target_include_directories(
PRIVATE
"${CMAKE_CURRENT_SOURCE_DIR}/../include")

target_link_libraries(static
LLVMCore LLVMPasses LLVMIRReader LLVMSupport
)
if(UNIX AND EXISTS "/etc/arch-release")
message("LLVM is installed as shared library on Arch Linux")
target_link_libraries(static LLVM)
else()
target_link_libraries(static
LLVMCore LLVMPasses LLVMIRReader LLVMSupport
)
endif()

0 comments on commit e0d525f

Please sign in to comment.