[Lldb-commits] [PATCH] D73839: [LLDB] Add missing declarations for linking to psapi

Martin Storsjö via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Sat Feb 1 13:11:20 PST 2020


mstorsjo created this revision.
mstorsjo added reviewers: labath, amccarth.
Herald added a subscriber: mgorny.
Herald added a project: LLDB.

This fixes building for mingw with BUILD_SHARED_LIBS. In static builds, the psapi dependency gets linked in transitively from Support, but when linking Support dynamically, it's revealed that these components also need linking against psapi.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73839

Files:
  lldb/source/Host/CMakeLists.txt
  lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt


Index: lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
===================================================================
--- lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
+++ lldb/source/Plugins/Process/Windows/Common/CMakeLists.txt
@@ -29,6 +29,7 @@
     lldbTarget
     ws2_32
     rpcrt4
+    psapi
   LINK_COMPONENTS
     Support
   )
Index: lldb/source/Host/CMakeLists.txt
===================================================================
--- lldb/source/Host/CMakeLists.txt
+++ lldb/source/Host/CMakeLists.txt
@@ -161,6 +161,9 @@
 if (LLDB_ENABLE_LZMA)
   list(APPEND EXTRA_LIBS ${LIBLZMA_LIBRARIES})
 endif()
+if (WIN32)
+  list(APPEND LLDB_SYSTEM_LIBS psapi)
+endif ()
 
 if (LLDB_ENABLE_LIBEDIT)
   list(APPEND LLDB_LIBEDIT_LIBS ${LibEdit_LIBRARIES})


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73839.241898.patch
Type: text/x-patch
Size: 786 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200201/627d8b20/attachment.bin>


More information about the lldb-commits mailing list