Skip to content

Commit

Permalink
auto merge of #9385 : alexcrichton/rust/actually-ndebug, r=pnkfelix
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
bors committed Sep 23, 2013
2 parents 40834a0 + 0442764 commit 03e5e96
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@ else
CFG_RUSTC_FLAGS += -O --cfg rtopt
endif

ifdef CFG_ENABLE_DEBUG
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
else
ifdef CFG_DISABLE_DEBUG
CFG_RUSTC_FLAGS += --cfg ndebug
CFG_GCCISH_CFLAGS += -DRUST_NDEBUG
else
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
CFG_RUSTC_FLAGS += --cfg debug
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
endif

ifdef SAVE_TEMPS
Expand Down

0 comments on commit 03e5e96

Please sign in to comment.