summaryrefslogtreecommitdiff
path: root/cmake/modules/AddLLVM.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/AddLLVM.cmake')
-rwxr-xr-xcmake/modules/AddLLVM.cmake14
1 files changed, 4 insertions, 10 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
index 1f0ff74c12..c531298a30 100755
--- a/cmake/modules/AddLLVM.cmake
+++ b/cmake/modules/AddLLVM.cmake
@@ -30,17 +30,11 @@ macro(add_llvm_executable name)
target_link_libraries(${name} ${llvm_libs})
else( MSVC )
add_dependencies(${name} llvm-config.target)
- if( MINGW )
- target_link_libraries(${name} imagehlp psapi)
- elseif( CMAKE_HOST_UNIX )
- if( HAVE_LIBDL )
- target_link_libraries(${name} dl)
- endif()
- if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
- target_link_libraries(${name} pthread)
- endif()
- endif( MINGW )
endif( MSVC )
+ get_system_libs(llvm_system_libs)
+ if( llvm_system_libs )
+ target_link_libraries(${name} ${llvm_system_libs})
+ endif()
endmacro(add_llvm_executable name)