aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
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