[llvm-dev] llvm 5.0.1 requires downstream workaround for diaguids.lib

Andrew Kelley via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 4 20:06:34 PST 2018


Greetings,

As of LLVM 5.0.1, LLVM generates a dependency on diaguids.lib if it finds
DIA SDK available.

This is ok, however llvm-config.exe does not expose the path to the
library, so it results in these link errors:

LLVMDebugInfoPDB.lib(DIASession.obj) : error LNK2019: unresolved external
symbol "long __cdecl NoRegCoCreate(wchar_t const *,struct _GUID const
&,struct _GUID const &,void * *)" (?NoRegCoCreate@@YAJPEB_WAEBU_GUID@
@1PEAPEAX at Z) referenced in function "public: static class llvm::Error
__cdecl llvm::pdb::DIASession::createFromExe(class llvm::StringRef,class
std::unique_ptr<class llvm::pdb::IPDBSession,struct
std::default_delete<class llvm::pdb::IPDBSession> > &)"
(?createFromExe at DIASession@pdb at llvm@@SA?AVError at 3@VStringRef at 3
@AEAV?$unique_ptr at VIPDBSession@pdb at llvm@@U?$default_delete at VIPDBSession
@pdb at llvm@@@std@@@std@@@Z)
[C:\projects\zig-d3l86\build-msvc-release\zig.vcxproj]
LLVMDebugInfoPDB.lib(DIASession.obj) : error LNK2019: unresolved external
symbol IID_IDiaDataSource referenced in function "public: static class
llvm::Error __cdecl llvm::pdb::DIASession::createFromExe(class
llvm::StringRef,class std::unique_ptr<class llvm::pdb::IPDBSession,struct
std::default_delete<class llvm::pdb::IPDBSession> > &)"
(?createFromExe at DIASession@pdb at llvm@@SA?AVError at 3@VStringRef at 3
@AEAV?$unique_ptr at VIPDBSession@pdb at llvm@@U?$default_delete at VIPDBSession
@pdb at llvm@@@std@@@std@@@Z)
[C:\projects\zig-d3l86\build-msvc-release\zig.vcxproj]
LLVMDebugInfoPDB.lib(DIASession.obj) : error LNK2019: unresolved external
symbol CLSID_DiaSource referenced in function "public: static class
llvm::Error __cdecl llvm::pdb::DIASession::createFromExe(class
llvm::StringRef,class std::unique_ptr<class llvm::pdb::IPDBSession,struct
std::default_delete<class llvm::pdb::IPDBSession> > &)"
(?createFromExe at DIASession@pdb at llvm@@SA?AVError at 3@VStringRef at 3
@AEAV?$unique_ptr at VIPDBSession@pdb at llvm@@U?$default_delete at VIPDBSession
@pdb at llvm@@@std@@@std@@@Z)
[C:\projects\zig-d3l86\build-msvc-release\zig.vcxproj]
C:\projects\zig-d3l86\build-msvc-release\Release\zig.exe : fatal error
LNK1120: 3 unresolved externals
[C:\projects\zig-d3l86\build-msvc-release\zig.vcxproj]


I have worked around this downstream like this:
https://github.com/zig-lang/zig/commit/1b120d1e49106d0683cc3e6ed766fd8534f798f2

However as you can see it would be much cleaner if llvm-config.exe would
expose this dependency.

This is LLVM 5.0.1, compiled using MSVC 2015 with -DCMAKE_BUILD_TYPE=Release

I am not sure if current trunk has this same problem. I will report back
when I find out.

Regards,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180104/c2e86078/attachment.html>


More information about the llvm-dev mailing list