From 32682f01faf0d2e596376f3e770d35c467059c16 Mon Sep 17 00:00:00 2001 From: Michael Smith Date: Sun, 13 Apr 2025 01:03:25 +0100 Subject: Enable trap-on-UB in debug builds This will help catch bugs in code, including incorrect use of unreachable/assume() macros. Best to test our assumptions before relying on them. --- compile.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile.bat') 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 -- cgit v1.2.3-54-g00ecf