diff options
author | Alex Richardson <arichardson@FreeBSD.org> | 2021-08-02 08:48:21 +0000 |
---|---|---|
committer | Alex Richardson <arichardson@FreeBSD.org> | 2021-08-02 13:33:24 +0000 |
commit | 7bc797e3f3807660cf98e5b1bd63545cafe820f8 (patch) | |
tree | a18a5a861b88b98e04104d5a563dbb4c4807e77a /share/mk/bsd.prog.mk | |
parent | 5f6c8ce2452da2da233e37bf4c2b6fccde8594b1 (diff) | |
download | src-7bc797e3f3807660cf98e5b1bd63545cafe820f8.tar.gz src-7bc797e3f3807660cf98e5b1bd63545cafe820f8.zip |
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
Diffstat (limited to 'share/mk/bsd.prog.mk')
-rw-r--r-- | share/mk/bsd.prog.mk | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/share/mk/bsd.prog.mk b/share/mk/bsd.prog.mk index 89eddb24abb0..96d72daf2611 100644 --- a/share/mk/bsd.prog.mk +++ b/share/mk/bsd.prog.mk @@ -81,6 +81,8 @@ CXXFLAGS+= -ftrivial-auto-var-init=pattern .endif .endif +.include "bsd.sanitizer.mk" + .if ${MACHINE_CPUARCH} == "riscv" && ${LINKER_FEATURES:Mriscv-relaxations} == "" CFLAGS += -mno-relax .endif |