Author: mstorsjo Date: Mon Sep 23 05:03:08 2019 New Revision: 372587 URL: http://llvm.org/viewvc/llvm-project?rev=372587&view=rev Log: [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 Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt Modified: lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt?rev=372587&r1=372586&r2=372587&view=diff ============================================================================== --- lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt (original) +++ lldb/trunk/source/Plugins/ObjectFile/PECOFF/CMakeLists.txt Mon Sep 23 05:03:08 2019 @@ -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(lldbPluginObjectFilePEC lldbHost lldbSymbol lldbTarget + ${DBGHELP_LINK_FILES} LINK_COMPONENTS BinaryFormat Support _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits