compile coverage

mac test build
This commit is contained in:
Matthew Kennedy 2025-01-07 21:26:28 -08:00 committed by rusefillc
parent 319f153734
commit 4090fe130b
1 changed files with 5 additions and 1 deletions

View File

@ -66,7 +66,7 @@ ifeq ($(USE_CPPOPT),)
USE_CPPOPT = -std=gnu++2a -fno-rtti -fno-use-cxa-atexit
endif
USE_CPPOPT += $(RUSEFI_CPPOPT)
USE_CPPOPT += $(RUSEFI_CPPOPT) -fPIC -fprofile-arcs -ftest-coverage
# Enable address sanitizer for C++ files, but not on Windows since x86_64-w64-mingw32-g++ doesn't support it.
# only c++ because lua does some things asan doesn't like, but don't actually cause overruns.
@ -203,6 +203,10 @@ ULIBDIR =
# List all user libraries here
ULIBS = -lm
ifneq ($(IS_MAC),yes)
ULIBS += -lgcov --coverage
endif
ifeq ($(COVERAGE),yes)
ULIBS += --coverage
endif