summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcompile2
-rw-r--r--compile.bat2
2 files changed, 2 insertions, 2 deletions
diff --git a/compile b/compile
index d3aa259..1e9812d 100755
--- a/compile
+++ b/compile
@@ -25,7 +25,7 @@ stdflags="-std=c2x -D_DEFAULT_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64"
dbg=0
if [ "$dbg" = 1 ]; then
- cflags="-O0 -g3"
+ cflags="-O0 -g3 -fsanitize-trap=undefined"
ldflags="-O0 -g3"
else
cflags="-O2 -fvisibility=hidden"
diff --git a/compile.bat b/compile.bat
index a756576..0c3bead 100644
--- a/compile.bat
+++ b/compile.bat
@@ -26,7 +26,7 @@ set dbg=0
:: XXX: -Og would be nice but apparently a bunch of stuff still gets inlined
:: which can be somewhat annoying so -O0 it is.
if "%dbg%"=="1" (
- set cflags=-O0 -g3
+ set cflags=-O0 -g3 -fsanitize-trap=undefined
set ldflags=-O0 -g3
) else (
set cflags=-O2