Skip to content

Commit

Permalink
FreeBSD: decouple ZFS_DEBUG from kernel debug settings
Browse files Browse the repository at this point in the history
Reviewed-by: Martelli Nikola @martellini
Reviewed-by: Ryan Moeller <ryan@iXsystems.com>
Signed-off-by: Matt Macy <mmacy@FreeBSD.org>
Closes #11213
  • Loading branch information
mattmacy authored Nov 24, 2020
1 parent 0657326 commit cd44f5b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion module/Makefile.bsd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit cd44f5b

Please sign in to comment.