hosted: Make ASAN build optional.

Use ASAN=1 on the make command line to activate,
This commit is contained in:
Uwe Bonnes 2020-09-11 12:16:45 +02:00 committed by UweBonnes
parent 120b3134bb
commit 6d18a61b2e
1 changed files with 2 additions and 0 deletions

View File

@ -5,8 +5,10 @@ CFLAGS +=-I ./target -I./platforms/pc
ifneq (, $(findstring linux, $(SYS))) ifneq (, $(findstring linux, $(SYS)))
SRC += serial_unix.c SRC += serial_unix.c
ifeq ($(ASAN), 1)
CFLAGS += -fsanitize=address CFLAGS += -fsanitize=address
LDFLAGS += -lasan LDFLAGS += -lasan
endif
else ifneq (, $(findstring mingw, $(SYS))) else ifneq (, $(findstring mingw, $(SYS)))
SRC += serial_win.c SRC += serial_win.c
LDFLAGS += -lws2_32 LDFLAGS += -lws2_32