[llvm-commits] [llvm] r116479 - in /llvm/trunk: cmake/modules/AddLLVM.cmake lib/System/CMakeLists.txt
Oscar Fuentes
ofv at wanadoo.es
Thu Oct 14 08:54:41 PDT 2010
Author: ofv
Date: Thu Oct 14 10:54:41 2010
New Revision: 116479
URL: http://llvm.org/viewvc/llvm-project?rev=116479&view=rev
Log:
When building shared libraries, link to required system libraries.
PR 8375
Modified:
llvm/trunk/cmake/modules/AddLLVM.cmake
llvm/trunk/lib/System/CMakeLists.txt
Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=116479&r1=116478&r2=116479&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Thu Oct 14 10:54:41 2010
@@ -9,6 +9,12 @@
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})
Modified: llvm/trunk/lib/System/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/CMakeLists.txt?rev=116479&r1=116478&r2=116479&view=diff
==============================================================================
--- llvm/trunk/lib/System/CMakeLists.txt (original)
+++ llvm/trunk/lib/System/CMakeLists.txt Thu Oct 14 10:54:41 2010
@@ -42,7 +42,3 @@
Win32/ThreadLocal.inc
Win32/TimeValue.inc
)
-
-if( BUILD_SHARED_LIBS AND NOT WIN32 )
- target_link_libraries(LLVMSystem ${CMAKE_DL_LIBS})
-endif()
More information about the llvm-commits
mailing list