From 6d18a61b2e5b9842d9cfd5df4cade1cb75a81204 Mon Sep 17 00:00:00 2001 From: Uwe Bonnes Date: Fri, 11 Sep 2020 12:16:45 +0200 Subject: [PATCH] hosted: Make ASAN build optional. Use ASAN=1 on the make command line to activate, --- src/platforms/hosted/Makefile.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/hosted/Makefile.inc b/src/platforms/hosted/Makefile.inc index d1700d0..b3c6501 100644 --- a/src/platforms/hosted/Makefile.inc +++ b/src/platforms/hosted/Makefile.inc @@ -5,8 +5,10 @@ CFLAGS +=-I ./target -I./platforms/pc ifneq (, $(findstring linux, $(SYS))) SRC += serial_unix.c +ifeq ($(ASAN), 1) CFLAGS += -fsanitize=address LDFLAGS += -lasan +endif else ifneq (, $(findstring mingw, $(SYS))) SRC += serial_win.c LDFLAGS += -lws2_32