summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorPeter Fors <peter.fors@mindkiller.com>2025-04-07 19:47:27 +0200
committerPeter Fors <peter.fors@mindkiller.com>2025-04-07 19:47:27 +0200
commitd45fbf8d2e1adcb35043dfc9e06eae3ccfdf596e (patch)
treec450bc97b2b0e767150e07db745328944dcd1041 /build.sh
parent5409798e800b6deb5d5874401a2925d1e18d8bd3 (diff)
cleanup and optimization tests, unfortunately nothing great.
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh7
1 files changed, 4 insertions, 3 deletions
diff --git a/build.sh b/build.sh
index 6ab9fc1..3e878d3 100755
--- a/build.sh
+++ b/build.sh
@@ -6,7 +6,8 @@ PROJECT_NAME="mknes" # Change this for each new project
# Base configuration common to all builds
CFLAGS="-std=gnu11 "
CFLAGS+="-mavx2 -mbmi2 -march=native "
-CFLAGS+="-mfunction-return=keep -mindirect-branch=keep "
+CFLAGS+="-mfunction-return=keep "
+CFLAGS+="-mindirect-branch=keep "
CFLAGS+="-fwrapv -ffast-math -fno-trapping-math -fwhole-program "
CFLAGS+="-fno-stack-protector -fno-PIE -no-pie -fno-strict-aliasing -ffunction-sections -fdata-sections "
# CFLAGS+="-fno-exceptions -fno-rtti -fno-use-cxa-atexit "
@@ -37,8 +38,8 @@ fi
case "$BUILD_TYPE" in
"normal")
- CFLAGS+=" -g -O2 -DDEBUG_INTERNAL"
-# -fsanitize=address,undefined -fno-omit-frame-pointer"
+ CFLAGS+=" -ggdb -fno-omit-frame-pointer -O2 -DDEBUG_INTERNAL"
+# -fsanitize=address,undefined,alignment,object-size,unreachable -fno-omit-frame-pointer"
;;
"release")
CFLAGS+=" -s -Wl,--strip-all -O2"