MSBuild: Support building with clang-cl

This commit is contained in:
Stenzek
2023-08-21 22:38:55 +10:00
parent bf15d13eb7
commit 76b5b8ad06
15 changed files with 862 additions and 34 deletions

View File

@ -129,8 +129,8 @@ static LONG NTAPI ExceptionHandler(PEXCEPTION_POINTERS exi)
{
char line[1024];
DWORD written;
std::snprintf(line, countof(line), "Exception 0x%08X at 0x%p\n", exi->ExceptionRecord->ExceptionCode,
exi->ExceptionRecord->ExceptionAddress);
std::snprintf(line, countof(line), "Exception 0x%08X at 0x%p\n",
static_cast<unsigned>(exi->ExceptionRecord->ExceptionCode), exi->ExceptionRecord->ExceptionAddress);
WriteFile(hFile, line, static_cast<DWORD>(std::strlen(line)), &written, nullptr);
}
@ -207,9 +207,13 @@ bool Install()
return false;
}
void SetWriteDirectory(const std::string_view& dump_directory) {}
void SetWriteDirectory(const std::string_view& dump_directory)
{
}
void Uninstall() {}
void Uninstall()
{
}
} // namespace CrashHandler

View File

@ -424,7 +424,7 @@ public:
LPSTR m_szSymPath;
#pragma pack(push, 8)
typedef struct IMAGEHLP_MODULE64_V3
struct IMAGEHLP_MODULE64_V3
{
DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
@ -453,7 +453,7 @@ public:
BOOL Publics; // contains public symbols
};
typedef struct IMAGEHLP_MODULE64_V2
struct IMAGEHLP_MODULE64_V2
{
DWORD SizeOfStruct; // set to sizeof(IMAGEHLP_MODULE64)
DWORD64 BaseOfImage; // base load address of module
@ -805,6 +805,8 @@ private:
case 8: //SymVirtual:
szSymType = "Virtual";
break;
default:
break;
}
}
LPCSTR pdbName = Module.LoadedImageName;

View File

@ -336,7 +336,7 @@ void Timer::NanoSleep(std::uint64_t ns)
if (SetWaitableTimer(timer, &due_time, 0, nullptr, nullptr, FALSE))
WaitForSingleObject(timer, INFINITE);
else
std::fprintf(stderr, "SetWaitableTimer() failed: %08X\n", GetLastError());
std::fprintf(stderr, "SetWaitableTimer() failed: %08X\n", static_cast<unsigned>(GetLastError()));
}
else
{