From: David Sterba Date: Sat, 3 Sep 2016 19:36:53 +0000 (+0200) Subject: btrfs-progs: build: add ASAN to debugging features X-Git-Tag: upstream/4.16.1~1319 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=857e55ab024a071565817ad2e72cbf0d1b52d71d;p=platform%2Fupstream%2Fbtrfs-progs.git btrfs-progs: build: add ASAN to debugging features usage: make D=asan Signed-off-by: David Sterba --- diff --git a/Makefile.in b/Makefile.in index 5c0c0d0..fd68b3e 100644 --- a/Makefile.in +++ b/Makefile.in @@ -17,6 +17,7 @@ # trace - print trace before the error/warning messages # abort - call abort() on first error (dumps core) # all - shortcut for all of the above +# asan - enable address sanitizer compiler feature # W=123 build with warnings (default: off) # DEBUG_CFLAGS additional compiler flags for debugging build # EXTRA_CFLAGS additional compiler flags @@ -145,6 +146,10 @@ ifneq (,$(findstring all,$(D))) DEBUG_CFLAGS_INTERNAL += -DDEBUG_ABORT_ON_ERROR=1 endif +ifneq (,$(findstring asan,$(D))) + DEBUG_CFLAGS_INTERNAL += -fsanitize=address +endif + MAKEOPTS = --no-print-directory Q=$(Q) # build all by default