From a424346e78bdf544c27249ca0bcca8ac56d0657a Mon Sep 17 00:00:00 2001 From: Quinn Date: Sun, 16 Feb 2025 19:08:00 +0100 Subject: [PATCH] add sanitizers to debug builds --- .vscode/launch.json | 2 +- makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.vscode/launch.json b/.vscode/launch.json index 8f20541..2a2f8d8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,7 @@ "type": "lldb", "request": "launch", "env": { - "DEBUG": "1" + "DEBUG": "1", }, "program": "", "linux": { diff --git a/makefile b/makefile index e2c7f00..4f2025c 100644 --- a/makefile +++ b/makefile @@ -8,7 +8,7 @@ CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -Wextra -Wpedantic -Wno-pointe LDFLAGS := $(shell pkg-config --libs sdl2) -lm ifeq ($(DEBUG),1) -CFLAGS += -DDEBUG -Og -g +CFLAGS += -DDEBUG -Og -g -fsanitize=address,undefined,leak,integer else REL_FLAGS += -O3 endif