mirror of
https://github.com/thepigeongenerator/sdl_template.git
synced 2025-12-17 05:55:47 +01:00
try to fix sanitisers
This commit is contained in:
2
.vscode/launch.json
vendored
2
.vscode/launch.json
vendored
@@ -7,6 +7,8 @@
|
|||||||
"request": "launch",
|
"request": "launch",
|
||||||
"env": {
|
"env": {
|
||||||
"DEBUG": "1",
|
"DEBUG": "1",
|
||||||
|
"ASAN_OPTIONS": "detect_leaks=0",
|
||||||
|
"UBSAN_OPTIONS": "print_stacktrace=1:halt_on_error=1",
|
||||||
},
|
},
|
||||||
"program": "",
|
"program": "",
|
||||||
"linux": {
|
"linux": {
|
||||||
|
|||||||
4
makefile
4
makefile
@@ -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 -fsanitize=address,undefined,leak,integer
|
CFLAGS += -DDEBUG -fsanitize=address,undefined,integer -g -Og
|
||||||
else
|
else
|
||||||
REL_FLAGS += -O3
|
REL_FLAGS += -O3
|
||||||
endif
|
endif
|
||||||
@@ -46,7 +46,7 @@ _build: compile_commands.json $(DIR) $(TARGET) $(ASSETS)
|
|||||||
clean:
|
clean:
|
||||||
rm -rf $(DIR_BIN) $(DIR_OBJ) compile_commands.json
|
rm -rf $(DIR_BIN) $(DIR_OBJ) compile_commands.json
|
||||||
|
|
||||||
# create the binary
|
# create the binary (linking step)
|
||||||
$(TARGET): $(OBJ)
|
$(TARGET): $(OBJ)
|
||||||
@$(call wr_colour,"using arguments: $(CFLAGS) $(LDFLAGS)",94)
|
@$(call wr_colour,"using arguments: $(CFLAGS) $(LDFLAGS)",94)
|
||||||
@$(CC) -o $(TARGET) $^ $(CFLAGS) $(LDFLAGS)
|
@$(CC) -o $(TARGET) $^ $(CFLAGS) $(LDFLAGS)
|
||||||
|
|||||||
Reference in New Issue
Block a user