mirror of
https://github.com/freebsd/freebsd-src.git
synced 2026-10-28 11:25:21 +01:00
FreeBSD: Make it possible to build openzfs.ko with sanitizers
Add make options which let one respectively compile the kernel modules with the address sanitizer, memory sanitizer, and undefined behaviour sanitizer enabled. This makes it much easier to run the ZTS with those sanitizers enabled. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Chris Longros <[email protected]> Signed-off-by: Mark Johnston <[email protected]> Closes #18596
This commit is contained in:
1 parent
dc585960e0
commit
e30ab5fa4f
1 file changed
+6
@@ -65,6 +65,12 @@ CFLAGS+= -DZFS_DEBUG -g
|
||||
CFLAGS += -DNDEBUG
|
||||
.endif
|
||||
|
||||
.for _SAN in KASAN KMSAN KUBSAN
|
||||
.if defined(WITH_${_SAN}) && ${WITH_${_SAN}} == "true"
|
||||
KERN_OPTS_EXTRA+= ${_SAN}
|
||||
.endif
|
||||
.endfor
|
||||
|
||||
.if defined(WITH_GCOV) && ${WITH_GCOV} == "true"
|
||||
CFLAGS+= -fprofile-arcs -ftest-coverage
|
||||
.endif
|
||||
|
||||
Reference in new issue
Block a user