make: cleanup and centralise DEVELHELP setting#8029
Conversation
|
requires #8030 |
cladmi
left a comment
There was a problem hiding this comment.
I like the idea, it adds a real configuration for "debug". It is not anymore a CFLAGS you set on your own.
Should also the NDEBUG configuration be adapted to use DEVELHELP instead of parsing CFLAGS ? https://github.com/RIOT-OS/RIOT/blob/2017.10-branch/makefiles/cflags.inc.mk#L64
| # Comment this out to disable code in RIOT that does safety checking | ||
| # which is not needed in a production environment but helps in the | ||
| # development process: | ||
| CFLAGS += -DDEVELHELP -Wall |
There was a problem hiding this comment.
-Wall got removed at the same time here
There was a problem hiding this comment.
IMHO wasn't appropriate place to activate that here anyway, use WERROR (see e.g. #7919) instead
|
|
||
| # Set this to 1 to enable code in RIOT that does safety checking | ||
| # which is not needed in a production environment but helps in the | ||
| # development process: |
There was a problem hiding this comment.
You could also add that it enables the DEBUG_PRINT macro. https://github.com/RIOT-OS/RIOT/blob/2017.10-branch/core/include/debug.h#L46
8bc85b7 to
be1a2cb
Compare
|
I like!
I think this is a rather big change and should maybe be kept out of this PR. |
mhm, it wasn't used consistently and also makes not much sense to have DEVELHELP active for examples by default (IMHO). Iff we want to have develhelp active nevertheless I would still adapt it here to set |
I think that would be the way to go! |
|
oh great, Murdock reveals failed assertion in gnrc: and further so my PR will be blocked by this (IMHO nonsense) GNRC merge embargo 😞 |
be1a2cb to
79d5ed8
Compare
|
Can we let |
|
(otherwise: should be pretty straight forward by setting |
I'd say murdock shouldn't compile differently from what the Makefile says, if possible. Also, for size monitoring, DEVELHELP shouldn't be set. (At least for tests/minimal, examples/hello-world, examples/gnrc_minimal ...) |
|
regarding murdock, I think we should compile everything with and without DEVELHELP=1, as it checks out differently - at least for the nightlies we should do that. |
Can you disable it for tests/minimal? |
Sorry, I meant, "shouldn't be changed" |
375abc7 to
7df250b
Compare
|
@kaspar030 I excluded |
|
I still [think] DEVELHELP doesn't make sense for examples by default |
|
I would prefer this separated in two PRs:
|
Sorry, but why? |
I'm sorry to be picky on this, but the switch also has to be used within the makefiles, instead of setting CFLAGS directly. |
374f888 to
533b676
Compare
|
good point @miri64, will do! |
|
@miri64 the doc is rather generic already, I don't see any point in fixing it - but could be extended?! |
Extension was what I was asking for. At least with regards to this PR. Something like the sentence "Can be set by setting environment variable |
533b676 to
8a677dc
Compare
|
@miri64 you fine with the extra doc? |
doc.txt
Outdated
| * | ||
| * Additional code parts such as (extensive) debug output and sanity | ||
| * checks using assertions. To activate set environment variable | ||
| * `DEVELHELP=1`, or disable (if on by default) with `DEVELHELP=0`. |
There was a problem hiding this comment.
the "if" looks a little bit out of place here.
8a677dc to
a05032f
Compare
|
@miri64 changed wording, better? |
This PR make the usage of DEVELHELP more consistent and easier to configure (IMHO 😄), i.e.,
its no longer required to explicitly set
CFLAGS += -DDEVELHELPin Makefiles but rather useDEVELHELP=1either in Makefile or as env variable on command line; specifically for the latter its simpler.Further this PR make usage of DEVELHELP more consistent, as follows:
tests/Makefile.test_common