From 966eb6646450fec69cbd4b314d1c48afdfcd6330 Mon Sep 17 00:00:00 2001 From: Johannes Stoelp Date: Mon, 3 Jul 2023 18:20:32 +0200 Subject: enable asa/lsan/ubsan --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 3f0706e..b5d6cf8 100644 --- a/Makefile +++ b/Makefile @@ -8,10 +8,11 @@ DEPS = $(TEST:%=build/%.d) # -- FLAGS --------------------------------------------------------------------- -DEPS_GEN = -MMD -CXXFLAGS = -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) +DEPS_GEN = -MMD +SANITIZER = -fsanitize=address -fsanitize=undefined -fsanitize=leak -fno-omit-frame-pointer -# -- RULES --------------------------------------------------------------------- +CXXFLAGS = -Og -g -Wall -Wextra -Werror -I. -std=c++14 $(DEPS_GEN) $(SANITIZER) +LDFLAGS = $(SANITIZER) all: build $(BINS) @@ -20,7 +21,7 @@ bear: bear citnames build/%: build/%.o - $(CXX) -o $@ $< + $(CXX) -o $@ $< $(LDFLAGS) build/%.o: test/%.cc $(CXX) -c -o $@ $< $(CXXFLAGS) -- cgit v1.2.3