Fix MK_TESTS build with MK_ASAN/MK_UBSAN

Reviewed By:	markj
Differential Revision: https://reviews.freebsd.org/D31049
This commit is contained in:
Alex Richardson
2021-08-02 09:49:50 +01:00
parent 9efbe526e0
commit c826e08841
2 changed files with 14 additions and 0 deletions
+6
View File
@@ -43,6 +43,12 @@ PROGS+= $p
NO_SHARED.$p=
SRCS.$p= mini-me.c
.endfor
.if ${MK_ASAN} != "no" || ${MK_UBSAN} != "no"
# mini-me.o is linked into a static binary so we can't use sanitizers.
# Note: We have to set CFLAGS here since it will be built as part of
# _PROGS_COMMON_OBJS and therefore NO_SHARED.$p does not disable ASAN/UBSAN.
CFLAGS.mini-me.c+= -fno-sanitize=address -fno-sanitize=undefined
.endif
BINDIR= ${TESTSDIR}