Open Bug 1363357 Opened 8 years ago Updated 2 years ago

Add a moz.configure template like `simple_bool_option` similar to `project_flag`

Categories

(Firefox Build System :: General, enhancement)

enhancement

Tracking

(Not tracked)

People

(Reporter: ted, Unassigned)

Details

bug 1257326 added the `project_flag` template to moz.configure which makes it very easy to add an option that sets a config variable and optionally a define, all-in-one. Unfortunately, as I found out after recommending its use in bug 1358215, it doesn't allow overriding the value from the environment, since it was intended to replicate the behavior of confvars.sh variables. I think in the interest of allowing people without a deep understanding of moz.configure to add new build options we should add something similar for general-purpose options. Perhaps `simple_bool_option`? I'm envisioning it being used like: simple_bool_option('--enable-foo', 'MOZ_FOO', help='Enable foo support', set_as_define=True, default=whatever) The template body would look extremely similar to `project_flag`: https://dxr.mozilla.org/mozilla-central/rev/b21b974d60d3075ae24f6fb1bae75d0f122f28fc/build/moz.configure/init.configure#758 so maybe we could combine them somehow. Essentially the only differences would be `possible_origins` and allowing a commandline argument to be set.
+1 from me. I can't believe this isn't what `project_flag` actually does. Can we just make `project_flag` a complete implementation of the behaviour that consumers expect and not add another subtly different invocation?
(In reply to Nick Alexander :nalexander from comment #1) > +1 from me. I can't believe this isn't what `project_flag` actually does. > > Can we just make `project_flag` a complete implementation of the behaviour > that consumers expect and not add another subtly different invocation? The rationale is https://bugzilla.mozilla.org/show_bug.cgi?id=1257326#c12 .
Product: Core → Firefox Build System
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.