mdbx-make: add check-analyzer check-ubsan check-asan check-leak targets.

This commit is contained in:
Leonid Yuriev 2020-05-03 02:07:21 +03:00
parent f11607dfa6
commit 2d75e9b5ba
2 changed files with 14 additions and 1 deletions

View File

@ -148,6 +148,19 @@ MDBX_BUILD_SOURCERY = $(shell set -o pipefail; $(MAKE) -s src/version.c && (open
check: test dist
check-analyzer:
@echo "NOTE: There a lot of false-positive warnings at 2020-05-01 by pre-release GCC-10 (20200328, Red Hat 10.0.1-0.11)"
$(MAKE) --always-make CFLAGS_EXTRA="-Og -fanalyzer -Wno-error" build-test
check-ubsan:
$(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-Ofast -fsanitize=undefined -fsanitize-undefined-trap-on-error" check
check-asan:
$(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-Os -fsanitize=address" check
check-leak:
$(MAKE) clean && $(MAKE) CFLAGS_EXTRA="-fsanitize=leak" check
build-test: all mdbx_example mdbx_test
test: build-test

View File

@ -1,4 +1,4 @@
all install mdbx tools strip clean test check dist test-singleprocess test-fault memcheck test-valgrind cross-gcc cross-qemu bench bench-quartet clean-bench reformat build-test:
all install mdbx tools strip clean test check dist test-singleprocess test-fault memcheck test-valgrind cross-gcc cross-qemu bench bench-quartet clean-bench reformat build-test check-analyzer check-ubsan check-asan check-leak:
@CC=$(CC) \
CXX=`if test -n "$(CXX)" && which "$(CXX)" > /dev/null; then echo "$(CXX)"; elif test -n "$(CCC)" && which "$(CCC)" > /dev/null; then echo "$(CCC)"; else echo "c++"; fi` \
`which gmake || which gnumake || echo 'echo "GNU Make is required"; exit 2;'` \