Skip to content

Commit da0f58b

Browse files
author
Matt Macy
committed
[FreeBSD] decouple ZFS_DEBUG from kernel debug settings
Signed-off-by: Matt Macy <[email protected]>
1 parent 4d0ba94 commit da0f58b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

module/Makefile.bsd

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,13 @@ CFLAGS+= -DHAVE_AVX2 -DHAVE_AVX -D__x86_64 -DHAVE_SSE2 -DHAVE_AVX512F -DHAVE_SSS
3939
.endif
4040

4141
.if defined(WITH_DEBUG) && ${WITH_DEBUG} == "true"
42-
CFLAGS+= -DINVARIANTS -DWITNESS -g -O0 -DZFS_DEBUG -DOPENSOLARIS_WITNESS
42+
CFLAGS+= -DZFS_DEBUG -g
43+
.if defined(WITH_INVARIANTS) && ${WITH_INVARIANTS} == "true"
44+
CFLAGS+= -DINVARIANTS -DWITNESS -DOPENSOLARIS_WITNESS
45+
.endif
46+
.if defined(WITH_O0) && ${WITH_O0} == "true"
47+
CFLAGS+= -O0
48+
.endif
4349
.else
4450
CFLAGS += -DNDEBUG
4551
.endif

0 commit comments

Comments
 (0)