Add build system support for ASAN+UBSAN instrumentation

This adds two new options WITH_ASAN/WITH_UBSAN that can be set to
enable instrumentation of all binaries with AddressSanitizer and/or
UndefinedBehaviourSanitizer. This current patch is almost sufficient
to get a complete buildworld with sanitizer instrumentation but in
order to actually build and boot a system it depends on a few more
follow-up commits.

Reviewed By:	brooks, kib, markj
Differential Revision: https://reviews.freebsd.org/D31043
This commit is contained in:
Alex Richardson
2021-08-02 09:48:21 +01:00
parent 5f6c8ce245
commit 7bc797e3f3
16 changed files with 92 additions and 6 deletions
+1
View File
@@ -104,6 +104,7 @@ build${libcompat}: .PHONY
OBJROOT='$${OBJTOP}/' \
MAKEOBJDIRPREFIX= \
DIRPRFX=${_dir}/ -DNO_LINT -DNO_CPU_CFLAGS \
MK_ASAN=no MK_UBSAN=no \
MK_CTF=no MK_RETPOLINE=no MK_WERROR=no \
${_t}
.endfor