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