diff options
-rwxr-xr-x | cmake/modules/AddLLVM.cmake | 6 | ||||
-rw-r--r-- | lib/System/CMakeLists.txt | 4 |
2 files changed, 6 insertions, 4 deletions
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index 22a456e460..b7ebe192fc 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -9,6 +9,12 @@ macro(add_llvm_library name) if( LLVM_COMMON_DEPENDS ) add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) endif( LLVM_COMMON_DEPENDS ) + + if( BUILD_SHARED_LIBS ) + get_system_libs(sl) + target_link_libraries( ${name} ${sl} ) + endif() + install(TARGETS ${name} LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) diff --git a/lib/System/CMakeLists.txt b/lib/System/CMakeLists.txt index b43c3afa52..5c15f8e9eb 100644 --- a/lib/System/CMakeLists.txt +++ b/lib/System/CMakeLists.txt @@ -42,7 +42,3 @@ add_llvm_library(LLVMSystem Win32/ThreadLocal.inc Win32/TimeValue.inc ) - -if( BUILD_SHARED_LIBS AND NOT WIN32 ) - target_link_libraries(LLVMSystem ${CMAKE_DL_LIBS}) -endif() |