hosted: Made ASAN globally available, not only on Linux.

This commit is contained in:
dragonmux 2022-07-11 10:17:42 -04:00 committed by Piotr Esden-Tempski
parent 4bea5cfe81
commit 83191bb87d
1 changed files with 6 additions and 5 deletions

View File

@ -18,14 +18,15 @@ else
endif endif
CFLAGS += -DHOSTED_BMP_ONLY=$(HOSTED_BMP_ONLY) CFLAGS += -DHOSTED_BMP_ONLY=$(HOSTED_BMP_ONLY)
ifeq ($(ASAN), 1)
CFLAGS += -fsanitize=address -Wno-format-truncation
LDFLAGS += -fsanitize=address
endif
HIDAPILIB = hidapi HIDAPILIB = hidapi
ifneq (, $(findstring linux, $(SYS))) ifneq (, $(findstring linux, $(SYS)))
SRC += serial_unix.c SRC += serial_unix.c
HIDAPILIB = hidapi-hidraw HIDAPILIB = hidapi-hidraw
ifeq ($(ASAN), 1)
CFLAGS += -fsanitize=address -Wno-format-truncation
LDFLAGS += -fsanitize=address
endif
else ifneq (, $(findstring mingw, $(SYS))) else ifneq (, $(findstring mingw, $(SYS)))
# Build for windows versions Vista, and above, where the # Build for windows versions Vista, and above, where the
# 'SetupDiGetDevicePropertyW()' function is available # 'SetupDiGetDevicePropertyW()' function is available