diff --git a/build.cmd b/build.cmd index fc16420..8f6d920 100644 --- a/build.cmd +++ b/build.cmd @@ -16,7 +16,8 @@ if "%1" == "debug" ( set LINK=/DEBUG ) else ( set CL=/O1 /GS- /DUNICODE /DNDEBUG /DPROGMGR_RELEASE /DPROGMGR_GIT_HASH="%GIT_HASH%" - set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF + rem set LINK=/NODEFAULTLIB /OPT:REF /OPT:ICF + set LINK=/OPT:REF /OPT:ICF ) pushd "%DIR_RELEASE%" @@ -31,5 +32,6 @@ cl /nologo /W3 /WX /MP /Feprogmgr.exe ^ /link /INCREMENTAL:NO /SUBSYSTEM:WINDOWS /FIXED /merge:_RDATA=.rdata ^ /MANIFEST:EMBED /MANIFESTINPUT:%DIR_PROGMGR%\progmgr.exe.manifest ^ kernel32.lib user32.lib gdi32.lib advapi32.lib shell32.lib ^ - secur32.lib comdlg32.lib pathcch.lib shlwapi.lib + secur32.lib comdlg32.lib pathcch.lib shlwapi.lib version.lib ^ + comctl32.lib uxtheme.lib popd diff --git a/progmgr/progmgr.c b/progmgr/progmgr.c index a67cd00..889b32c 100644 --- a/progmgr/progmgr.c +++ b/progmgr/progmgr.c @@ -193,6 +193,12 @@ int WINAPI wWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, return 0; } + +/* + +// NOTE(u130b8): We used to compile Release builds with /NODEFAULTLIB +// but I've temporarily removed it so malloc and free works. + // 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. @@ -215,3 +221,5 @@ void __stdcall wWinMainCRTStartup() { ExitProcess(code); } #endif + +*/ \ No newline at end of file