diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2020-03-23 14:52:01 -0400 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2020-03-23 14:52:01 -0400 |
commit | 629a1b62f1c41cb9533a6977e63402a55e601d23 (patch) | |
tree | 05fcf9680669e2a7130d8f147ac6f8965ce90251 /Makefile | |
parent | effed9df8af7a1e7c94ff63cd02eb44394800d17 (diff) | |
download | bfs-629a1b62f1c41cb9533a6977e63402a55e601d23.tar.xz |
Makefile: Add asan, msan, ubsan targets
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 15 |
1 files changed, 12 insertions, 3 deletions
@@ -100,6 +100,15 @@ bfs: \ util.o $(CC) $(ALL_LDFLAGS) $^ $(ALL_LDLIBS) -o $@ +asan: LOCAL_CFLAGS += $(ASAN_CFLAGS) +asan: bfs + +ubsan: LOCAL_CFLAGS += $(UBSAN_CFLAGS) +ubsan: bfs + +msan: LOCAL_CFLAGS += $(MSAN_CFLAGS) +msan: bfs + release: CFLAGS := -g $(WFLAGS) -O3 -flto -DNDEBUG release: bfs @@ -115,10 +124,10 @@ check-%: all ./tests.sh --bfs="$(CURDIR)/bfs -S $*" $(TEST_FLAGS) distcheck: - +$(MAKE) -Bs check CFLAGS="$(CFLAGS) $(ASAN_CFLAGS) $(UBSAN_CFLAGS)" $(DISTCHECK_FLAGS) + +$(MAKE) -Bs asan ubsan check $(DISTCHECK_FLAGS) ifneq ($(OS),Darwin) - +$(MAKE) -Bs check CC=clang CFLAGS="$(CFLAGS) $(MSAN_CFLAGS)" $(DISTCHECK_FLAGS) - +$(MAKE) -Bs check CFLAGS="$(CFLAGS) -m32" $(DISTCHECK_FLAGS) + +$(MAKE) -Bs msan check CC=clang $(DISTCHECK_FLAGS) + +$(MAKE) -Bs check CFLAGS="-m32" $(DISTCHECK_FLAGS) endif +$(MAKE) -Bs release check $(DISTCHECK_FLAGS) +$(MAKE) -Bs check $(DISTCHECK_FLAGS) |