From 2e5a4b3691daba0d21cddd582a55ad2c3216fed3 Mon Sep 17 00:00:00 2001 From: Matthew Kennedy Date: Tue, 7 Sep 2021 14:39:04 -0700 Subject: [PATCH] no asan on windows (#3230) --- unit_tests/unit_test_rules.mk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/unit_tests/unit_test_rules.mk b/unit_tests/unit_test_rules.mk index 146a164094..3e3989a33c 100644 --- a/unit_tests/unit_test_rules.mk +++ b/unit_tests/unit_test_rules.mk @@ -29,7 +29,11 @@ endif # See explanation in main firmware Makefile for these three defines USE_OPT += -DEFI_UNIT_TEST=1 -DEFI_PROD_CODE=0 -DEFI_SIMULATOR=0 -#todo #3221 -fsanitize=address + +# Enable address sanitizer, but not on Windows since x86_64-w64-mingw32-g++ doesn't support it. +ifneq ($(OS),Windows_NT) + USE_OPT += -fsanitize=address +endif # Pretend we are all different hardware so that all canned engine configs are included USE_OPT += -DHW_MICRO_RUSEFI=1 -DHW_PROTEUS=1 -DHW_FRANKENSO=1 -DHW_HELLEN=1 @@ -177,7 +181,10 @@ ULIBDIR = # List all user libraries here ULIBS = -lm ULIBS += --coverage -#todo #3221 -fsanitize=address + +ifneq ($(OS),Windows_NT) + ULIBS += -fsanitize=address +endif # # End of user defines