Update build

This commit is contained in:
Synthasmagoria 2026-09-02 00:05:57 +02:00
commit c9b770661a
3 changed files with 11 additions and 6 deletions

View file

@ -8,7 +8,7 @@ if [[ -v 1 ]]; then
if [ "$1" = "DEBUG" ]; then
ODIN_FLAGS="-debug"
elif [ "$1" = "RELEASE" ]; then
ODIN_FLAGS="-o:speed"
ODIN_FLAGS="-o:speed -extra-linker-flags:\"-Wl,--gc-sections\""
else
echo "Usage: <script> <DEBUG/RELEASE>"
exit 1
@ -22,3 +22,7 @@ mkdir -p $OUT_DIR
odin build src/desktop -out:"$OUT_DIR/$EXE_NAME" $ODIN_FLAGS
cp -R $ASSETS_DIR ./$OUT_DIR/
echo "Desktop build created in ${OUT_DIR}"
if [ "$1" = "RELEASE" ]; then
upx "$OUT_DIR/$EXE_NAME"
fi