Set MOZ_DEBUG globally as both a CONFIG and a #define

RESOLVED FIXED in Firefox 58

Status

enhancement
RESOLVED FIXED
2 years ago
Last year

People

(Reporter: glandium, Assigned: glandium)

Tracking

(Depends on 1 bug, Blocks 1 bug)

unspecified
mozilla58
Dependency tree / graph

Firefox Tracking Flags

(firefox58 fixed)

Details

Attachments

(1 attachment)

Assignee

Description

2 years ago
No description provided.
Comment hidden (mozreview-request)
Assignee

Updated

2 years ago
Depends on: 1411201

Comment 2

2 years ago
mozreview-review
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+
Assignee

Comment 3

2 years ago
(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)

Comment 4

2 years ago
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: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58

Updated

Last year
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.