summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/ObjectFile
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-09-23 12:03:08 +0000
committerMartin Storsjo <martin@martin.st>2019-09-23 12:03:08 +0000
commitfb31852fbc4e3095527180f0aef655800f3f04d4 (patch)
tree00e8f5e157ba47499b24d21b302219a05dbad0a9 /lldb/source/Plugins/ObjectFile
parent8969f8d11ea7a6a1dd369bfdce4c5a0091579348 (diff)
downloadbcm5719-llvm-fb31852fbc4e3095527180f0aef655800f3f04d4.tar.gz
bcm5719-llvm-fb31852fbc4e3095527180f0aef655800f3f04d4.zip
[LLDB] Add a missing specification of linking against dbghelp
The PECOFF object file plugin uses the dbghelp API, but doesn't specify that it has to be linked in anywhere. Current MSVC based builds have probably succeeded, as other parts in LLDB have had a "#pragma comment(lib, "dbghelp.lib")", but there's currently no such pragma in the PECOFF plugin. The "#pragma comment(lib, ...)" approach doesn't work in MinGW mode (unless the compiler is given the -fms-extensions option, and even then, it's only supported by clang/lld, not by GCC/binutils), thus add it to be linked via CMake. (The other parts of LLDB that use dbghelp are within _MSC_VER ifdefs.) Differential Revision: https://reviews.llvm.org/D67885 llvm-svn: 372587
Diffstat (limited to 'lldb/source/Plugins/ObjectFile')
-rw-r--r--lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt8
1 files changed, 8 insertions, 0 deletions
diff --git a/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt b/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
index 04321f27655..6981f7ecb71 100644
--- a/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
+++ b/lldb/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt
@@ -1,3 +1,10 @@
+# Dbghelp is used on windows for writing minidump files.
+if(WIN32)
+ set(DBGHELP_LINK_FILES dbghelp)
+else()
+ set(DBGHELP_LINK_FILES "")
+endif()
+
add_lldb_library(lldbPluginObjectFilePECOFF PLUGIN
ObjectFilePECOFF.cpp
WindowsMiniDump.cpp
@@ -7,6 +14,7 @@ add_lldb_library(lldbPluginObjectFilePECOFF PLUGIN
lldbHost
lldbSymbol
lldbTarget
+ ${DBGHELP_LINK_FILES}
LINK_COMPONENTS
BinaryFormat
Support
OpenPOWER on IntegriCloud