[llvm] r201077 - [CMake] LLVMSupport should be responsible to provide system_libs.

NAKAMURA Takumi geek4civic at gmail.com
Mon Feb 10 02:52:19 PST 2014


Author: chapuni
Date: Mon Feb 10 04:52:19 2014
New Revision: 201077

URL: http://llvm.org/viewvc/llvm-project?rev=201077&view=rev
Log:
[CMake] LLVMSupport should be responsible to provide system_libs.

Modified:
    llvm/trunk/cmake/modules/AddLLVM.cmake
    llvm/trunk/cmake/modules/TableGen.cmake
    llvm/trunk/lib/Support/CMakeLists.txt
    llvm/trunk/utils/FileCheck/CMakeLists.txt
    llvm/trunk/utils/FileUpdate/CMakeLists.txt
    llvm/trunk/utils/not/CMakeLists.txt

Modified: llvm/trunk/cmake/modules/AddLLVM.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/AddLLVM.cmake?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/AddLLVM.cmake (original)
+++ llvm/trunk/cmake/modules/AddLLVM.cmake Mon Feb 10 04:52:19 2014
@@ -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)
 
 

Modified: llvm/trunk/cmake/modules/TableGen.cmake
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/cmake/modules/TableGen.cmake?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/cmake/modules/TableGen.cmake (original)
+++ llvm/trunk/cmake/modules/TableGen.cmake Mon Feb 10 04:52:19 2014
@@ -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

Modified: llvm/trunk/lib/Support/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/CMakeLists.txt?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/lib/Support/CMakeLists.txt (original)
+++ llvm/trunk/lib/Support/CMakeLists.txt Mon Feb 10 04:52:19 2014
@@ -117,3 +117,5 @@ add_llvm_library(LLVMSupport
   Windows/TimeValue.inc
   Windows/Watchdog.inc
   )
+
+link_system_libs(LLVMSupport)

Modified: llvm/trunk/utils/FileCheck/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileCheck/CMakeLists.txt?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/utils/FileCheck/CMakeLists.txt (original)
+++ llvm/trunk/utils/FileCheck/CMakeLists.txt Mon Feb 10 04:52:19 2014
@@ -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()

Modified: llvm/trunk/utils/FileUpdate/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/FileUpdate/CMakeLists.txt?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/utils/FileUpdate/CMakeLists.txt (original)
+++ llvm/trunk/utils/FileUpdate/CMakeLists.txt Mon Feb 10 04:52:19 2014
@@ -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()

Modified: llvm/trunk/utils/not/CMakeLists.txt
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/not/CMakeLists.txt?rev=201077&r1=201076&r2=201077&view=diff
==============================================================================
--- llvm/trunk/utils/not/CMakeLists.txt (original)
+++ llvm/trunk/utils/not/CMakeLists.txt Mon Feb 10 04:52:19 2014
@@ -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()





More information about the llvm-commits mailing list