Mercurial > hg > sidinfo
comparison Makefile.gen @ 363:ab53c76f40d5
Add Makefile parameter ASAN to enable address sanitizer build (and disable -O and -flto when doing that.)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 11 Sep 2020 01:59:35 +0300 |
parents | 969f86b74bff |
children | f0ad03639a93 |
comparison
equal
deleted
inserted
replaced
362:5a1c5af0ced1 | 363:ab53c76f40d5 |
---|---|
1 CFLAGS += -W -Wall -Wextra -std=c99 -pedantic -I./ -D_XOPEN_SOURCE=500 | 1 CFLAGS += -W -Wall -Wextra -std=c99 -pedantic -I./ -D_XOPEN_SOURCE=500 |
2 CFLAGS += -g | 2 CFLAGS += -g |
3 CFLAGS += -O2 | |
4 #CFLAGS += -flto | |
5 CFLAGS += -DTH_USE_OPT_ARG=1 | 3 CFLAGS += -DTH_USE_OPT_ARG=1 |
6 THLIBS = th-libs/ | 4 THLIBS = th-libs/ |
7 | 5 |
6 ifneq ($(ASAN),) | |
7 CFLAGS += -fsanitize=address | |
8 LDFLAGS += -lasan | |
9 else | |
10 CFLAGS += -O2 | |
11 CFLAGS += -flto | |
12 endif | |
8 | 13 |
9 ### | 14 ### |
10 ### Objects and targets | 15 ### Objects and targets |
11 ### | 16 ### |
12 THLIBS_OBJ=th_util.o th_string.o th_file.o th_args.o \ | 17 THLIBS_OBJ=th_util.o th_string.o th_file.o th_args.o \ |