Closed Bug 1913656 Opened 9 months ago Closed 9 months ago

MOZ_OPTIMIZE is always 1 even with --disable-optimize

Categories

(Firefox Build System :: General, defect)

defect

Tracking

(firefox-esr115 unaffected, firefox-esr128 unaffected, firefox129 unaffected, firefox130 unaffected, firefox131 fixed)

RESOLVED FIXED
131 Branch
Tracking Status
firefox-esr115 --- unaffected
firefox-esr128 --- unaffected
firefox129 --- unaffected
firefox130 --- unaffected
firefox131 --- fixed

People

(Reporter: arai, Assigned: arai)

References

(Regression)

Details

(Keywords: regression)

Attachments

(1 file)

MOZ_OPTIMIZE is set to "1" depending on MOZ_OPTIMIZE_FLAGS environment variable, where the condition env_flags becomes truthy if the environment variable has any value, including empty string, given the value is represented as a tuple ("",).

https://searchfox.org/mozilla-central/rev/53e68046298557fae0c922230b595bb6689bf587/build/moz.configure/toolchain.configure#110-115

@depends("--enable-optimize", "MOZ_OPTIMIZE_FLAGS")
def moz_optimize(enable_optimize, env_flags):
    return "1" if enable_optimize or env_flags else None


set_config("MOZ_OPTIMIZE", moz_optimize)

The MOZ_OPTIMIZE_FLAGS environment variable has default value "", which means the option is always truthy, and MOZ_OPTIMIZE is always "1", and --disable-optimize has no effect.

https://searchfox.org/mozilla-central/rev/53e68046298557fae0c922230b595bb6689bf587/build/moz.configure/toolchain.configure#81-86

option(
    env="MOZ_OPTIMIZE_FLAGS",
    help="Extra optimization flags.",
    nargs=1,
    default="",
)

Set release status flags based on info from the regressing bug 1906599

:sergesanspaille, since you are the author of the regressor, bug 1906599, could you take a look? Also, could you set the severity field?

For more information, please visit BugBot documentation.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED

Bug 1906824 if where the return "1" if enable_optimize or env_flags else None was added.

Regressed by: 1906824
No longer regressed by: 1906599
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/76af1ed54229 Do not set default value for MOZ_OPTIMIZE_FLAGS environment variable to make the default state falsy. r=firefox-build-system-reviewers,sergesanspaille
Status: ASSIGNED → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
Target Milestone: --- → 131 Branch
Flags: needinfo?(sguelton)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: