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.
This commit is contained in:
commit
03e5e96315
|
@ -100,12 +100,13 @@ else
|
||||||
CFG_RUSTC_FLAGS += -O --cfg rtopt
|
CFG_RUSTC_FLAGS += -O --cfg rtopt
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifdef CFG_ENABLE_DEBUG
|
ifdef CFG_DISABLE_DEBUG
|
||||||
$(info cfg: enabling more debugging (CFG_ENABLE_DEBUG))
|
|
||||||
CFG_GCCISH_CFLAGS += -DRUST_DEBUG
|
|
||||||
else
|
|
||||||
CFG_RUSTC_FLAGS += --cfg ndebug
|
CFG_RUSTC_FLAGS += --cfg ndebug
|
||||||
CFG_GCCISH_CFLAGS += -DRUST_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
|
endif
|
||||||
|
|
||||||
ifdef SAVE_TEMPS
|
ifdef SAVE_TEMPS
|
||||||
|
|
Loading…
Reference in New Issue