summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNAKAMURA Takumi <geek4civic@gmail.com>2014-02-10 10:52:19 +0000
committerNAKAMURA Takumi <geek4civic@gmail.com>2014-02-10 10:52:19 +0000
commit2f96171cb0793755ce64d1b7449a4cc4585a72d1 (patch)
treec6ecde90cc74ed09c71265385c00e1eea6109124
parent3686e38c3d74df38092855a1d12398b5dee9f0a9 (diff)
downloadbcm5719-llvm-2f96171cb0793755ce64d1b7449a4cc4585a72d1.tar.gz
bcm5719-llvm-2f96171cb0793755ce64d1b7449a4cc4585a72d1.zip
[CMake] LLVMSupport should be responsible to provide system_libs.
llvm-svn: 201077
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake5
-rw-r--r--llvm/cmake/modules/TableGen.cmake5
-rw-r--r--llvm/lib/Support/CMakeLists.txt2
-rw-r--r--llvm/utils/FileCheck/CMakeLists.txt6
-rw-r--r--llvm/utils/FileUpdate/CMakeLists.txt6
-rw-r--r--llvm/utils/not/CMakeLists.txt6
6 files changed, 2 insertions, 28 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 83f57a708a3..59add8d3597 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -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)
diff --git a/llvm/cmake/modules/TableGen.cmake b/llvm/cmake/modules/TableGen.cmake
index 700affab102..6e52e4d5341 100644
--- a/llvm/cmake/modules/TableGen.cmake
+++ b/llvm/cmake/modules/TableGen.cmake
@@ -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
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index a6ebb12e51a..5d533dea658 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -117,3 +117,5 @@ add_llvm_library(LLVMSupport
Windows/TimeValue.inc
Windows/Watchdog.inc
)
+
+link_system_libs(LLVMSupport)
diff --git a/llvm/utils/FileCheck/CMakeLists.txt b/llvm/utils/FileCheck/CMakeLists.txt
index d691ceb429c..999320f78af 100644
--- a/llvm/utils/FileCheck/CMakeLists.txt
+++ b/llvm/utils/FileCheck/CMakeLists.txt
@@ -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()
diff --git a/llvm/utils/FileUpdate/CMakeLists.txt b/llvm/utils/FileUpdate/CMakeLists.txt
index 0114e50c627..ce7478f77af 100644
--- a/llvm/utils/FileUpdate/CMakeLists.txt
+++ b/llvm/utils/FileUpdate/CMakeLists.txt
@@ -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()
diff --git a/llvm/utils/not/CMakeLists.txt b/llvm/utils/not/CMakeLists.txt
index 5ff14d6692d..4a92348ba0f 100644
--- a/llvm/utils/not/CMakeLists.txt
+++ b/llvm/utils/not/CMakeLists.txt
@@ -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()
OpenPOWER on IntegriCloud