Add ASAN build target with UNICORN_ASAN or via './make.sh asan'

This commit is contained in:
Zach Riggle
2016-04-20 15:38:27 -07:00
parent 8932463f9d
commit 93063d089b
4 changed files with 32 additions and 4 deletions

View File

@ -4,6 +4,13 @@ CFLAGS += -L ../../
CFLAGS += -lcmocka -lunicorn
CFLAGS += -I ../../include
ifeq ($(UNICORN_ASAN),yes)
CC = clang -fsanitize=address -fno-omit-frame-pointer
CXX = clang++ -fsanitize=address -fno-omit-frame-pointer
AR = llvm-ar
LDFLAGS := -fsanitize=address ${LDFLAGS}
endif
ALL_TESTS = test_sanity test_x86 test_mem_map test_mem_high test_mem_map_ptr \
test_tb_x86 test_multihook test_pc_change test_x86_soft_paging \
test_hookcounts