[CMake] LLVMSupport should be responsible to provide system_libs.
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Feb 2014 10:52:19 +0000 (10:52 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Feb 2014 10:52:19 +0000 (10:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201077 91177308-0d34-0410-b5e6-96231b3b80d8

cmake/modules/AddLLVM.cmake
cmake/modules/TableGen.cmake
lib/Support/CMakeLists.txt
utils/FileCheck/CMakeLists.txt
utils/FileUpdate/CMakeLists.txt
utils/not/CMakeLists.txt

index 83f57a708a3ae12f0c7f21dae595188e0e4c69a1..59add8d3597403dfeb8c3204ccb5ab2deaa7fa76 100644 (file)
@@ -238,10 +238,6 @@ function(llvm_add_library name)
 
   llvm_config(${name} ${ARG_LINK_COMPONENTS} ${LLVM_LINK_COMPONENTS})
 
-  # Ensure that the system libraries always comes last on the
-  # list. Without this, linking the unit tests on MinGW fails.
-  link_system_libs( ${name} )
-
   if(LLVM_COMMON_DEPENDS)
     add_dependencies(${name} ${LLVM_COMMON_DEPENDS})
   endif()
@@ -330,7 +326,6 @@ macro(add_llvm_executable name)
   if( LLVM_COMMON_DEPENDS )
     add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
   endif( LLVM_COMMON_DEPENDS )
-  link_system_libs( ${name} )
 endmacro(add_llvm_executable name)
 
 
index 700affab10210242a2b352027893e6b68663e131..6e52e4d53418ee5d64472915d62a2c6c4dd152ac 100644 (file)
@@ -117,15 +117,10 @@ macro(add_tablegen target project)
   endif()
 
   if( MINGW )
-    target_link_libraries(${target} imagehlp psapi shell32)
     if(CMAKE_SIZEOF_VOID_P MATCHES "8")
       set_target_properties(${target} PROPERTIES LINK_FLAGS -Wl,--stack,16777216)
     endif(CMAKE_SIZEOF_VOID_P MATCHES "8")
   endif( MINGW )
-  if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD AND NOT BEOS )
-    target_link_libraries(${target} pthread)
-  endif()
-
   if (${project} STREQUAL LLVM AND NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
     install(TARGETS ${target}
             EXPORT LLVMExports
index a6ebb12e51a7255c3616341459ceeffb3a7876dc..5d533dea6589b0535c5d062507eda61400dd4e0b 100644 (file)
@@ -117,3 +117,5 @@ add_llvm_library(LLVMSupport
   Windows/TimeValue.inc
   Windows/Watchdog.inc
   )
+
+link_system_libs(LLVMSupport)
index d691ceb429cc354979b7b2742baacddddceba549..999320f78af28090496c43e7db1a02a04b011033 100644 (file)
@@ -3,9 +3,3 @@ add_llvm_utility(FileCheck
   )
 
 target_link_libraries(FileCheck LLVMSupport)
-if( MINGW )
-  target_link_libraries(FileCheck imagehlp psapi shell32)
-endif( MINGW )
-if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
-  target_link_libraries(FileCheck pthread)
-endif()
index 0114e50c6274306c720e56b5dfbbb4939d72af76..ce7478f77af37cdfdc40c656d50de19eaf281844 100644 (file)
@@ -3,9 +3,3 @@ add_llvm_utility(FileUpdate
   )
 
 target_link_libraries(FileUpdate LLVMSupport)
-if( MINGW )
-  target_link_libraries(FileUpdate imagehlp psapi shell32)
-endif( MINGW )
-if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
-  target_link_libraries(FileUpdate pthread)
-endif()
index 5ff14d6692d4002ea0ab976dc4b136a4a836377a..4a92348ba0f9d82ed4c307f170da2e02e63c5636 100644 (file)
@@ -3,9 +3,3 @@ add_llvm_utility(not
   )
 
 target_link_libraries(not LLVMSupport)
-if( MINGW )
-  target_link_libraries(not imagehlp psapi shell32)
-endif( MINGW )
-if( LLVM_ENABLE_THREADS AND HAVE_LIBPTHREAD )
-  target_link_libraries(not pthread)
-endif()