From 75160e955a036b8bdd7b07597e971252581618ff Mon Sep 17 00:00:00 2001 From: Onur Gündüz Date: Thu, 4 Jun 2026 19:05:09 +0200 Subject: build: add address/undefined sanitizers to debug builds --- Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index b6f3143..ddfa2b3 100644 --- a/Makefile +++ b/Makefile @@ -90,8 +90,10 @@ mlx: # ============================================================================= # Debug build # ============================================================================= -debug: CFLAGS = -Wall -Wextra -g -O0 -DDEBUG -fsanitize=address -debug: LDFLAGS += -fsanitize=address +SANITIZE ?= address,undefined + +debug: CFLAGS = -Wall -Wextra -g -O0 -DDEBUG -fsanitize=$(SANITIZE) +debug: LDFLAGS += -fsanitize=$(SANITIZE) debug: $(MAKE) clean $(MAKE) $(TARGET) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)" -- cgit v1.3.1