build: Enforce address sanitisaton when debugging.

This commit is contained in:
Roy Marples 2019-11-03 23:24:09 +00:00
parent 538b3073c4
commit e23d415cba

4
configure vendored
View File

@ -375,6 +375,10 @@ fi
if [ -n "$DEBUG" -a "$DEBUG" != no -a "$DEBUG" != false ]; then
echo "Adding debugging CFLAGS"
cat <<EOF >>$CONFIG_MK
# Enforce address sanitization
CFLAGS+= -fsanitize=address
LDFLAGS+= -fsanitize=address
CFLAGS+= -g -Wall -Wextra
CFLAGS+= -Wmissing-prototypes -Wmissing-declarations
CFLAGS+= -Wmissing-format-attribute -Wnested-externs