comment the no_crt situation
This commit is contained in:
@@ -15,7 +15,7 @@ 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_GIT_HASH="%GIT_HASH%"
|
||||||
set LINK=/DEBUG
|
set LINK=/DEBUG
|
||||||
) else (
|
) else (
|
||||||
set CL=/O1 /GS- /DUNICODE /DNDEBUG /DPROGMGR_NO_CRT /DPROGMGR_GIT_HASH="%GIT_HASH%"
|
set CL=/O1 /GS- /DUNICODE /DNDEBUG /DPROGMGR_GIT_HASH="%GIT_HASH%"
|
||||||
set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF
|
set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -166,7 +166,11 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance,
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef PROGMGR_NO_CRT
|
// NOTE(u130b8): We're compiling without the C runtime by default in Release builds.
|
||||||
|
// 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
|
||||||
#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