[Build] Add address sanitizer option if ASAN=1

This commit is contained in:
Émilie Feral
2018-03-27 16:03:19 +02:00
committed by LeaNumworks
parent f2efd46814
commit 8dbe719a68
2 changed files with 9 additions and 0 deletions

View File

@@ -18,6 +18,11 @@ else
SFLAGS += -Os
endif
ifeq ($(ASAN),1)
SFLAGS += -fsanitize=address
LDFLAGS += -fsanitize=address
endif
# Flags - Header search path
SFLAGS += -Ilib -I.

View File

@@ -2,3 +2,7 @@ export AFL_QUIET = 1
CC = afl-clang
CXX = afl-clang++
LD = afl-clang++
ifeq ($(ASAN),1)
export AFL_USE_ASAN = 1
endif