use custom defines to prevent vs builds from breaking

This commit is contained in:
u130b8
2023-09-07 11:11:47 +03:00
parent a074441a99
commit d7a3802571
2 changed files with 3 additions and 3 deletions

View File

@@ -12,10 +12,10 @@ set /P GIT_HASH=<%DIR_RELEASE%\.git_hash
set "GIT_HASH=%GIT_HASH:~0,8%"
if "%1" == "debug" (
set CL=/MT /Od /Zi /RTC1 /Fdprogmgr.pdb /fsanitize=address /DUNICODE /DPROGMGR_GIT_HASH="%GIT_HASH%"
set CL=/MT /Od /Zi /RTC1 /Fdprogmgr.pdb /fsanitize=address /DUNICODE /DPROGMGR_DEBUG /DPROGMGR_GIT_HASH="%GIT_HASH%"
set LINK=/DEBUG
) else (
set CL=/O1 /GS- /DUNICODE /DNDEBUG /DPROGMGR_GIT_HASH="%GIT_HASH%"
set CL=/O1 /GS- /DUNICODE /DNDEBUG /DPROGMGR_RELEASE /DPROGMGR_GIT_HASH="%GIT_HASH%"
set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF
)

View File

@@ -170,7 +170,7 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
// But in Debug builds, we need the C runtime, otherwise the address sanitizer and
// MSVC debug tools break because they use the wWinMainCRTStartup entrypoint to initialize.
#ifdef NDEBUG
#ifdef PROGMGR_RELEASE
#pragma function(memset)
void *memset(char* dst, int value, size_t count) {
while (count--) { *dst++ = value; }