Merge pull request #37 from u130b8/master

Fix build.cmd
This commit is contained in:
freedom
2023-10-13 08:16:53 -06:00
committed by GitHub
2 changed files with 12 additions and 2 deletions

View File

@@ -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

View File

@@ -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
*/