summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-05-29 10:15:29 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-05-29 10:15:29 -0700
commitb4599a48694b78a5db144f17c2ab281a6d9f17d1 (patch)
tree44196cf7204aade8acfce11f76551be0831e3923 /Makefile
parent8f429810c03f1d869936776b174332d55ff88bde (diff)
Added Ubsan build target, to check for undefined behavior.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile8
1 files changed, 7 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3606368..5ad87d0 100644
--- a/Makefile
+++ b/Makefile
@@ -19,7 +19,7 @@ VERSION?=$(SPECVERSION)
RELEASE?=CommonMark-$(VERSION)
INSTALL_PREFIX?=/usr/local
-.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug asan mingw archive bench astyle update-spec afl
+.PHONY: all cmake_build spec leakcheck clean fuzztest dingus upload test update-site upload-site debug ubsan asan mingw archive bench astyle update-spec afl
all: cmake_build man/man3/cmark.3
@@ -47,6 +47,12 @@ debug:
cmake .. -DCMAKE_BUILD_TYPE=Debug; \
make
+ubsan:
+ mkdir -p $(BUILDDIR); \
+ cd $(BUILDDIR); \
+ cmake .. -DCMAKE_BUILD_TYPE=Ubsan; \
+ make
+
asan:
mkdir -p $(BUILDDIR); \
cd $(BUILDDIR); \