Closed Bug 1411156 Opened 7 years ago Closed 7 years ago

Set MOZ_DEBUG globally as both a CONFIG and a #define

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set
normal

Tracking

(firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox58 --- fixed

People

(Reporter: glandium, Assigned: glandium)

References

(Depends on 1 open bug, Blocks 1 open bug)

Details

Attachments

(1 file)

      No description provided.
Depends on: 1411201
Comment on attachment 8921345 [details]
Bug 1411156 - Set MOZ_DEBUG globally as both a CONFIG and a #define.

https://reviewboard.mozilla.org/r/192370/#review197666

::: moz.configure:106
(Diff revision 1)
>            help='Enable building with developer debug info '
>                 '(using the given compiler flags).')
>  
> -add_old_configure_assignment('MOZ_DEBUG',
> -                             depends('--enable-debug')(lambda v: bool(v)))
> +@depends('--enable-debug')
> +def moz_debug(debug):
> +    if debug:

Why do you need this if statement? It seems to work fine without it (just return bool(debug) always).
Attachment #8921345 - Flags: review?(mshal) → review+
(In reply to Michael Shal [:mshal] from comment #2)
> Comment on attachment 8921345 [details]
> Bug 1411156 - Set MOZ_DEBUG globally as both a CONFIG and a #define.
> 
> https://reviewboard.mozilla.org/r/192370/#review197666
> 
> ::: moz.configure:106
> (Diff revision 1)
> >            help='Enable building with developer debug info '
> >                 '(using the given compiler flags).')
> >  
> > -add_old_configure_assignment('MOZ_DEBUG',
> > -                             depends('--enable-debug')(lambda v: bool(v)))
> > +@depends('--enable-debug')
> > +def moz_debug(debug):
> > +    if debug:
> 
> Why do you need this if statement? It seems to work fine without it (just
> return bool(debug) always).

Because, especially for defines, there's a difference between "not defined" and "no/false value". Without the if, we end up with -DMOZ_DEBUG="" in ACDEFINES, and #define MOZ_DEBUG in mozilla-config.h. (which is weird, I was expecting something different, actually ; comes from bug 1258618, apparently)
Pushed by mh@glandium.org:
https://hg.mozilla.org/integration/autoland/rev/396203b98e35
Set MOZ_DEBUG globally as both a CONFIG and a #define. r=mshal
https://hg.mozilla.org/mozilla-central/rev/396203b98e35
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Depends on: 1415686
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: