summaryrefslogtreecommitdiff
path: root/compile
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
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')
-rwxr-xr-xcompile8
1 files changed, 4 insertions, 4 deletions
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
}