Closed Bug 1401654 Opened 2 years ago Closed 2 years ago

Move MOZ_WEBRTC et al. to moz.configure

Categories

(Firefox Build System :: General, enhancement)

enhancement
Not set

Tracking

(firefox57 wontfix, firefox58 fixed)

RESOLVED FIXED
mozilla58
Tracking Status
firefox57 --- wontfix
firefox58 --- fixed

People

(Reporter: chmanchester, Assigned: chmanchester)

Details

Attachments

(1 file)

I had a patch to do this written and tested. Not sure if it's going to end up blocking other stuff, but it's worth landing anyway.
Comment on attachment 8910448 [details]
Bug 1401654 - Move MOZ_WEBRTC and some related defines to moz.configure.

https://reviewboard.mozilla.org/r/181882/#review187602

::: toolkit/moz.configure:1197
(Diff revision 2)
> +
> +    if os_match and cpu_match:
> +        return True
> +    return False
> +
> +option('--disable-webrtc', default=webrtc_default,

It looks like the other --disable options don't have a default, but instead do the per-target default logic in the equivalent of the webrtc() function. Is this approach better because you don't have to check the origin of the --disable-webrtc flag in that function? I was slightly confused at first since the default value seems inverted with the --disable flags (ie: if webrtc_default() returns True, that means we are not using --disable-webrtc).
Attachment #8910448 - Flags: review?(mshal) → review+
Comment on attachment 8910448 [details]
Bug 1401654 - Move MOZ_WEBRTC and some related defines to moz.configure.

https://reviewboard.mozilla.org/r/181882/#review187602

> It looks like the other --disable options don't have a default, but instead do the per-target default logic in the equivalent of the webrtc() function. Is this approach better because you don't have to check the origin of the --disable-webrtc flag in that function? I was slightly confused at first since the default value seems inverted with the --disable flags (ie: if webrtc_default() returns True, that means we are not using --disable-webrtc).

Yeah, it's preferable to checking the origin in cases we aren't forcing the value to be enable/disabled anywhere.
Pushed by cmanchester@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/d2ab042f20e4
Move MOZ_WEBRTC and some related defines to moz.configure. r=mshal
https://hg.mozilla.org/mozilla-central/rev/d2ab042f20e4
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla58
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.