aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 62d9f3195b..1f0ff74c12 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -33,7 +33,9 @@ macro(add_llvm_executable name)
if( MINGW )
target_link_libraries(${name} imagehlp psapi)
elseif( CMAKE_HOST_UNIX )
- target_link_libraries(${name} dl)
+ if( HAVE_LIBDL )
+ target_link_libraries(${name} dl)
+ endif()
if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
target_link_libraries(${name} pthread)
endif()