Skip to content

Commit 03e5e96

Browse files
committed
auto merge of #9385 : alexcrichton/rust/actually-ndebug, r=pnkfelix
Turns out that even if the default is "enabled", that doesn't mean that the CFG_ENABLE_DEBUG variable will be defined. Instead, test whether CFG_DISABLE_DEBUG is defined and disable debug things if that's the case.
2 parents 40834a0 + 0442764 commit 03e5e96

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

Makefile.in

+5-4
Original file line numberDiff line numberDiff line change
@@ -100,12 +100,13 @@ else
100100
CFG_RUSTC_FLAGS += -O --cfg rtopt
101101
endif
102102

103-
ifdef CFG_ENABLE_DEBUG
104-
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
105-
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
106-
else
103+
ifdef CFG_DISABLE_DEBUG
107104
CFG_RUSTC_FLAGS += --cfg ndebug
108105
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
106+
else
107+
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
108+
CFG_RUSTC_FLAGS += --cfg debug
109+
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
109110
endif
110111

111112
ifdef SAVE_TEMPS

0 commit comments

Comments
 (0)