Enable debug mode on BUILD=debug#6898
Conversation
|
I'm not sure these are equivalent. CC @yebblies |
ifdef ENABLE_DEBUG
CXXFLAGS += -g -g3 -DDEBUG=1 -DUNITTEST CXXFLAGS += -g -g3 -DDEBUG=1 -DUNITTEST
DFLAGS += -g -debug -unittest DFLAGS += -g -debug -unittest
endif endifwhereas |
|
Yes, I was surprised by this behavior the other day as well. |
src/posix.mak
Outdated
| ifneq ($(BUILD),debug) | ||
| $(error Unrecognized BUILD=$(BUILD), must be 'debug' or 'release') | ||
| endif | ||
| ENABLE_DEBUG := 1 |
There was a problem hiding this comment.
tabs vs. spaces as in the rest of the file.
|
Please add documentation about what this does to the makefile, not just here. |
|
Thanks for your pull request, @wilzbach! Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. |
This Makefile was more or less undocumented, so I started an attempt to document it. |
|
As no one objected for the last two months, can we move forward with this trivial improvement? |
|
I ran into this confusion just the other day, so this PR is most welcome. LGTM. |
| ################################################################################ | ||
| # Important variables: | ||
| # -------------------- | ||
| # |
There was a problem hiding this comment.
The formatting is off on these comments - perhaps you're using tabs?
| # | ||
| # HOST_CSS: Host C++ compiler to use (g++,clang++) | ||
| # HOST_DMD: Host D compiler to use for bootstrapping | ||
| # AUTO_BOOTSTRAP: Enable auto-boostrapping by download a stable DMD binary |
| ################################################################################ | ||
| # Build modes: | ||
| # ------------ | ||
| # BUILD: release (default) | debug (enabled a build with debug symbols) |
There was a problem hiding this comment.
Probably ought to say that this is intended to be set on the command line



I expected
make -f posix.mak BUILD=debugto work out of the box and generate a debug build of the compiler (with debug info!).