btrfs-progs: build: add ASAN to debugging features
usage: make D=asan Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
7d6307dcf3
commit
857e55ab02
|
@ -17,6 +17,7 @@
|
||||||
# trace - print trace before the error/warning messages
|
# trace - print trace before the error/warning messages
|
||||||
# abort - call abort() on first error (dumps core)
|
# abort - call abort() on first error (dumps core)
|
||||||
# all - shortcut for all of the above
|
# all - shortcut for all of the above
|
||||||
|
# asan - enable address sanitizer compiler feature
|
||||||
# W=123 build with warnings (default: off)
|
# W=123 build with warnings (default: off)
|
||||||
# DEBUG_CFLAGS additional compiler flags for debugging build
|
# DEBUG_CFLAGS additional compiler flags for debugging build
|
||||||
# EXTRA_CFLAGS additional compiler flags
|
# EXTRA_CFLAGS additional compiler flags
|
||||||
|
@ -145,6 +146,10 @@ ifneq (,$(findstring all,$(D)))
|
||||||
DEBUG_CFLAGS_INTERNAL += -DDEBUG_ABORT_ON_ERROR=1
|
DEBUG_CFLAGS_INTERNAL += -DDEBUG_ABORT_ON_ERROR=1
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifneq (,$(findstring asan,$(D)))
|
||||||
|
DEBUG_CFLAGS_INTERNAL += -fsanitize=address
|
||||||
|
endif
|
||||||
|
|
||||||
MAKEOPTS = --no-print-directory Q=$(Q)
|
MAKEOPTS = --no-print-directory Q=$(Q)
|
||||||
|
|
||||||
# build all by default
|
# build all by default
|
||||||
|
|
Loading…
Reference in New Issue