Makefile: allow running multiple sanitizers at once
authorXiretza <xiretza@xiretza.xyz>
Tue, 16 Mar 2021 15:41:31 +0000 (16:41 +0100)
committerMiodrag Milanovic <mmicko@gmail.com>
Mon, 5 Jul 2021 14:42:10 +0000 (16:42 +0200)
Makefile

index 0311607aa7691f6c1132934dddd4db167662b75b..d585512a5363f1de67d8c0c148bb43f0412a3115 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -193,14 +193,14 @@ ifneq ($(SANITIZER),)
 $(info [Clang Sanitizer] $(SANITIZER))
 CXXFLAGS += -g -O1 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fsanitize=$(SANITIZER)
 LDFLAGS += -g -fsanitize=$(SANITIZER)
-ifeq ($(SANITIZER),address)
+ifneq ($(findstring address,$(SANITIZER)),)
 ENABLE_COVER := 0
 endif
-ifeq ($(SANITIZER),memory)
+ifneq ($(findstring memory,$(SANITIZER)),)
 CXXFLAGS += -fPIE -fsanitize-memory-track-origins
 LDFLAGS += -fPIE -fsanitize-memory-track-origins
 endif
-ifeq ($(SANITIZER),cfi)
+ifneq ($(findstring cfi,$(SANITIZER)),)
 CXXFLAGS += -flto
 LDFLAGS += -flto
 endif