mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-28 00:58:21 +08:00
mdbx-make: add check-analyzer check-ubsan check-asan check-leak targets.
This commit is contained in:
parent
f11607dfa6
commit
2d75e9b5ba
13
GNUmakefile
13
GNUmakefile
@ -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
|
||||
|
2
Makefile
2
Makefile
@ -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;'` \
|
||||
|
Loading…
x
Reference in New Issue
Block a user