From 2344c8df392d4d8489c5bbee60a6894f908561e5 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Tue, 13 Jan 2026 19:30:47 +0000 Subject: 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. --- compile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compile') diff --git a/compile b/compile index 3ede107..0860bdf 100755 --- a/compile +++ b/compile @@ -28,8 +28,8 @@ if [ "$dbg" = 1 ]; then cflags="-O0 -g3 -masm=intel -fsanitize-trap=undefined -DSST_DBG" ldflags="-O0 -g3" else - cflags="-O2 -fvisibility=hidden -masm=intel -ffreestanding" - ldflags="-O2 -s -ffreestanding" + cflags="-flto -O2 -fvisibility=hidden -masm=intel -ffreestanding" + ldflags="-flto -O2 -s -ffreestanding" fi objs= @@ -40,12 +40,12 @@ cc() { # ugly annoying special case if [ "$_mn" = " -DMODULE_NAME=con_" ]; then _mn=" -DMODULE_NAME=con" elif [ "$_mn" = "-DMODULE_NAME=sst" ]; then _mn=; fi - $CC -c -flto -fpic -fno-ident $cflags $warnings -include src/1.h \ + $CC -c -fpic -fno-ident $cflags $warnings -include src/1.h \ -I.build/include $stdflags$_mn -o ".build/${_bn%%.c}.o" "src/$1" } ld() { - $CC -shared -flto -fpic -fuse-ld=lld $ldflags -L.build -ldl \ + $CC -shared -fpic -fuse-ld=lld $ldflags -L.build -ldl \ -ltier0 -lvstdlib -o .build/sst.so$objs mv .build/sst.so sst.so } -- cgit v1.2.3-54-g00ecf