From d658586d0d28c10f2b2f64e3b372a4c3199b692a Mon Sep 17 00:00:00 2001 From: Romain Vimont Date: Fri, 9 Feb 2018 12:12:07 +0100 Subject: [PATCH] Enable sanitizer in debug builds "make build-debug" will build with ASAN and USAN enabled. --- Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6098887b..b049b925 100644 --- a/Makefile +++ b/Makefile @@ -20,7 +20,8 @@ clean: rm -rf "$(APP_BUILD_DIR)" "$(APP_BUILD_DEBUG_DIR)" "$(DIST)" build-app-debug: - [ -d "$(APP_BUILD_DEBUG_DIR)" ] || ( mkdir "$(APP_BUILD_DEBUG_DIR)" && meson app "$(APP_BUILD_DEBUG_DIR)" --buildtype debug ) + [ -d "$(APP_BUILD_DEBUG_DIR)" ] || ( mkdir "$(APP_BUILD_DEBUG_DIR)" && \ + CFLAGS=-fsanitize=address,undefined meson app "$(APP_BUILD_DEBUG_DIR)" --buildtype debug ) ninja -C "$(APP_BUILD_DEBUG_DIR)" build-server-debug: