use custom defines to prevent vs builds from breaking
This commit is contained in:
@@ -12,10 +12,10 @@ set /P GIT_HASH=<%DIR_RELEASE%\.git_hash
|
|||||||
set "GIT_HASH=%GIT_HASH:~0,8%"
|
set "GIT_HASH=%GIT_HASH:~0,8%"
|
||||||
|
|
||||||
if "%1" == "debug" (
|
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
|
set LINK=/DEBUG
|
||||||
) else (
|
) 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
|
set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// 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.
|
// MSVC debug tools break because they use the wWinMainCRTStartup entrypoint to initialize.
|
||||||
|
|
||||||
#ifdef NDEBUG
|
#ifdef PROGMGR_RELEASE
|
||||||
#pragma function(memset)
|
#pragma function(memset)
|
||||||
void *memset(char* dst, int value, size_t count) {
|
void *memset(char* dst, int value, size_t count) {
|
||||||
while (count--) { *dst++ = value; }
|
while (count--) { *dst++ = value; }
|
||||||
|
|||||||
Reference in New Issue
Block a user