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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compile') 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" -- cgit v1.2.3-54-g00ecf