summaryrefslogtreecommitdiff
path: root/compile.bat
diff options
context:
space:
mode:
authorGravatar Michael Smith <mikesmiffy128@gmail.com> 2026-01-13 19:30:47 +0000
committerGravatar Michael Smith <mikesmiffy128@gmail.com> 2026-04-04 01:37:54 +0100
commit2344c8df392d4d8489c5bbee60a6894f908561e5 (patch)
tree8362d16db0e6116c7a5414d932cc4cac24d0e9dc /compile.bat
parentb891ce7ef63c7a75c3f5fd108032aea552536369 (diff)
downloadsst-2344c8df392d4d8489c5bbee60a6894f908561e5.tar.gz
sst-2344c8df392d4d8489c5bbee60a6894f908561e5.zip
Don't bother with LTO in debug builds
There was never really much point in this, and it probably slowed things down a little bit, though not a lot.
Diffstat (limited to 'compile.bat')
-rw-r--r--compile.bat8
1 files changed, 4 insertions, 4 deletions
diff --git a/compile.bat b/compile.bat
index 10be904..b101ebe 100644
--- a/compile.bat
+++ b/compile.bat
@@ -29,8 +29,8 @@ if "%dbg%"=="1" (
set cflags=-O0 -g3 -masm=intel -fsanitize-trap=undefined -DSST_DBG
set ldflags=-O0 -g3
) else (
- set cflags=-O2 -masm=intel -ffreestanding
- set ldflags=-O2 -ffreestanding
+ set cflags=-flto -O2 -masm=intel -ffreestanding
+ set ldflags=-flto -O2 -ffreestanding
)
set objs=
@@ -46,7 +46,7 @@ set dmodname= -DMODULE_NAME=%basename%
if "%dmodname%"==" -DMODULE_NAME=con_" set dmodname= -DMODULE_NAME=con
if "%dmodname%"==" -DMODULE_NAME=sst" set dmodname=
set objs=%objs% .build/%basename%%ext%.o
-%CC% -c -flto -mno-stack-arg-probe %cflags% %warnings% %stdflags% -include src/1.h ^
+%CC% -c -mno-stack-arg-probe %cflags% %warnings% %stdflags% -include src/1.h ^
-I.build/include -D_DLL%dmodname% -o .build/%basename%%ext%.o %1 || goto :end
goto :eof
@@ -145,7 +145,7 @@ if "%dbg%"=="1" (
) else (
set clibs=-lucrt
)
-%CC% -fuse-ld=lld -shared -flto %ldflags% -Wl,-implib:.build/sst.lib,-Brepro,-nodefaultlib,-safeseh:no ^
+%CC% -fuse-ld=lld -shared %ldflags% -Wl,-implib:.build/sst.lib,-Brepro,-nodefaultlib,-safeseh:no ^
-L.build %clibs% -lkernel32 -luser32 -lbcryptprimitives -lshlwapi -ld3d9 -ldsound ^
-ltier0 -lvstdlib -lntdll -o .build/sst.dll%objs% .build/dll.res || goto :end
:: get rid of another useless file (can we just not create this???)