summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
Diffstat (limited to 'llvm')
-rw-r--r--llvm/cmake/modules/AddLLVM.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
index 85149abf5e3..0276bf6ffe4 100644
--- a/llvm/cmake/modules/AddLLVM.cmake
+++ b/llvm/cmake/modules/AddLLVM.cmake
@@ -333,6 +333,13 @@ function(llvm_add_library name)
${lib_deps}
${llvm_libs}
)
+ elseif((CYGWIN OR WIN32) AND ARG_SHARED)
+ # Win32's import library may be unaware of its dependent libs.
+ target_link_libraries(${name} PRIVATE
+ ${ARG_LINK_LIBS}
+ ${lib_deps}
+ ${llvm_libs}
+ )
elseif(ARG_SHARED AND BUILD_SHARED_LIBS)
# FIXME: It may be PRIVATE since SO knows its dependent libs.
target_link_libraries(${name} PUBLIC
OpenPOWER on IntegriCloud