From c821dcb236538308c669a7e5c3a57adb56a817eb Mon Sep 17 00:00:00 2001 From: Rangi42 Date: Tue, 24 Sep 2024 14:51:46 -0400 Subject: [PATCH] Add Makefile flags for debugging --- tools/Makefile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/Makefile b/tools/Makefile index f00a048669..57d9e9d7bd 100644 --- a/tools/Makefile +++ b/tools/Makefile @@ -1,7 +1,19 @@ .PHONY: all clean CC := gcc -CFLAGS := -O3 -flto -std=c11 -Wall -Wextra -pedantic +CFLAGS := -g -ggdb3 -O3 -flto -std=c11 -Wall -Wextra -pedantic \ + -Walloc-zero -Wcast-align -Wcast-qual -Wduplicated-branches -Wduplicated-cond \ + -Wfloat-equal -Wlogical-op -Wnull-dereference -Wshift-overflow=2 \ + -Wstringop-overflow=4 -Wundef -Wuninitialized -Wunused -Wshadow \ + -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=1 \ + -Wno-format-nonliteral -Wno-strict-overflow -Wno-unused-but-set-variable \ + -Wno-type-limits -Wno-tautological-constant-out-of-range-compare \ + -D_GLIBCXX_ASSERTIONS \ + -fsanitize=shift -fsanitize=integer-divide-by-zero \ + -fsanitize=unreachable -fsanitize=vla-bound \ + -fsanitize=signed-integer-overflow -fsanitize=bounds \ + -fsanitize=object-size -fsanitize=bool -fsanitize=enum \ + -fsanitize=alignment -fsanitize=null -fsanitize=address tools := \ gfx \