aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorMatthew Macy <[email protected]>2020-11-24 09:16:46 -0800
committerGitHub <[email protected]>2020-11-24 09:16:46 -0800
commitcd44f5be37d994a59b6afac8eb3b3827ad63212f (patch)
tree58cfa7e2ff6f03ac2629387eb486ba0720940e95 /module
parent0657326f9cc6aaf35e90657171bc0f6ad96e29a9 (diff)
FreeBSD: decouple ZFS_DEBUG from kernel debug settings
Reviewed-by: Martelli Nikola @martellini Reviewed-by: Ryan Moeller <[email protected]> Signed-off-by: Matt Macy <[email protected]> Closes #11213
Diffstat (limited to 'module')
-rw-r--r--module/Makefile.bsd8
1 files changed, 7 insertions, 1 deletions
diff --git a/module/Makefile.bsd b/module/Makefile.bsd
index 1acf543ac..e7cddcc5b 100644
--- a/module/Makefile.bsd
+++ b/module/Makefile.bsd
@@ -39,7 +39,13 @@ CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_SSE2 -DHAVE_AVX512F -DHAVE_SSS
.endif
.if defined(WITH_DEBUG) && ${WITH_DEBUG} == "true"
-CFLAGS+= -DINVARIANTS -DWITNESS -g -O0 -DZFS_DEBUG -DOPENSOLARIS_WITNESS
+CFLAGS+= -DZFS_DEBUG -g
+.if defined(WITH_INVARIANTS) && ${WITH_INVARIANTS} == "true"
+ CFLAGS+= -DINVARIANTS -DWITNESS -DOPENSOLARIS_WITNESS
+.endif
+.if defined(WITH_O0) && ${WITH_O0} == "true"
+ CFLAGS+= -O0
+.endif
.else
CFLAGS += -DNDEBUG
.endif