maint: add address-sanitizer build target
use 'make build-asan' to rebuild sed with gcc's address sanitizer. * cfg.mk (build-asan): New target.
This commit is contained in:
1 parent
9a9f9e34f3
commit
0cc0ade423
1 file changed
+12
@@ -356,3 +356,15 @@ static-analysis-make:
|
||||
.PHONY: static-analysis
|
||||
static-analysis: static-analysis-init static-analysis-config \
|
||||
static-analysis-make
|
||||
|
||||
ASAN_FLAGS=-fsanitize=address -fno-omit-frame-pointer
|
||||
ASAN_CFLAGS=-O0 -g -Dlint $(ASAN_FLAGS)
|
||||
ASAN_LDFLAGS=$(ASAN_FLAGS)
|
||||
|
||||
.PHONY: build-asan
|
||||
build-asan:
|
||||
test -x ./configure || \
|
||||
{ echo "./configure script not found" >&2; exit 1; }
|
||||
./configure CFLAGS="$(ASAN_CFLAGS)" LDFLAGS="$(ASAN_LDFLAGS)"
|
||||
make
|
||||
|
||||
Reference in new issue
Block a user