From 8d5a3c47db07a28448ff002df1c2702105dcb3ed Mon Sep 17 00:00:00 2001 From: tGecko Date: Sat, 28 Dec 2024 12:27:18 +0100 Subject: [PATCH] add make targets with enabled address sanitizer --- Makefile | 3 +++ src/common/commands.mk | 1 + src/common/recipes.mk | 3 +++ 3 files changed, 7 insertions(+) diff --git a/Makefile b/Makefile index 2e9e45183..03a1d063b 100644 --- a/Makefile +++ b/Makefile @@ -238,6 +238,9 @@ deepclean: clean dev: clean @$(MAKE_DEV) +asan: clean + @$(MAKE_ASAN) + git-clean: @git clean -xfd -e .vscode diff --git a/src/common/commands.mk b/src/common/commands.mk index d7c7839b4..eac8e2a6d 100644 --- a/src/common/commands.mk +++ b/src/common/commands.mk @@ -30,6 +30,7 @@ COLOR_REP = sed \ -e 's/\(make\[[0-9]\+\]: Entering directory.*\)/\\\e[1;30m\1\\\e[0m/g' \ -e 's/\(make\[[0-9]\+\]: Leaving directory.*\)/\\\e[1;30m\1\\\e[0m/g' MAKE_DEV = DEBUG=1 COLORS=1 make --no-print-directory +MAKE_ASAN = DEBUG=1 SANITIZE=1 COLORS=1 make --no-print-directory ifeq (1,$(COLORS)) COLOR_BLUE = "\e[1;34m" diff --git a/src/common/recipes.mk b/src/common/recipes.mk index 4092c6c06..a3fbc95f5 100644 --- a/src/common/recipes.mk +++ b/src/common/recipes.mk @@ -24,3 +24,6 @@ install: dev: clean @$(MAKE_DEV) + +asan: clean + @$(MAKE_ASAN) \ No newline at end of file