Skip to content

Commit 9ab4f56

Browse files
committed
Fix the build of DIASession.cpp on Windows with VS 2017 + DIA SDK.
On VS 2017, _MSC_VER is > 1910, and so the build fails with the following error: Unknown Visual Studio version The fix is based on the sources of LLVM 5.0, where this has been fixed: https://github.com/llvm-mirror/llvm/blob/master/lib/DebugInfo/PDB/DIA/DIASession.cpp#L76 The reason we were unable to reproduce this build issue is that when you open llvm/src/lib/DebugInfo/PDB/CMakeLists.txt, you can see that DIASession.cpp is built only if you have Debug Interface Access SDK (DIA SDK) in your system. For more information, see the following issues: * https://github.com/avast-tl/fileformat/issues/4 * avast/retdec#61
1 parent 8ca8e1c commit 9ab4f56

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib/DebugInfo/PDB/DIA/DIASession.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ Error LoadDIA(CComPtr<IDiaDataSource> &DiaDataSource) {
5858
#endif
5959

6060
const wchar_t *msdia_dll = nullptr;
61-
#if _MSC_VER == 1900
61+
#if _MSC_VER >= 1900 && _MSC_VER < 2000
6262
msdia_dll = L"msdia140.dll"; // VS2015
63-
#elif _MSC_VER == 1800
63+
#elif _MSC_VER >= 1800
6464
msdia_dll = L"msdia120.dll"; // VS2013
6565
#else
6666
#error "Unknown Visual Studio version."

0 commit comments

Comments
 (0)