add sanitizers to debug builds

This commit is contained in:
2025-02-16 19:08:00 +01:00
parent 4b3f7ef455
commit a424346e78
2 changed files with 2 additions and 2 deletions

2
.vscode/launch.json vendored
View File

@@ -6,7 +6,7 @@
"type": "lldb", "type": "lldb",
"request": "launch", "request": "launch",
"env": { "env": {
"DEBUG": "1" "DEBUG": "1",
}, },
"program": "", "program": "",
"linux": { "linux": {

View File

@@ -8,7 +8,7 @@ CFLAGS := $(shell pkg-config --cflags sdl2) -Wall -Wextra -Wpedantic -Wno-pointe
LDFLAGS := $(shell pkg-config --libs sdl2) -lm LDFLAGS := $(shell pkg-config --libs sdl2) -lm
ifeq ($(DEBUG),1) ifeq ($(DEBUG),1)
CFLAGS += -DDEBUG -Og -g CFLAGS += -DDEBUG -Og -g -fsanitize=address,undefined,leak,integer
else else
REL_FLAGS += -O3 REL_FLAGS += -O3
endif endif