Platform/Channel-specific build defines

From MozillaWiki
Jump to: navigation, search

The Mozilla build system defines the following variables (both as AC_DEFINE, for the C++/XUL preprocessors, and AC_SUBST for autoconf/Makefiles) that can be used to control when during the release cycle a feature/code is enabled.

NIGHTLY_BUILD

This is defined when milestone.txt contains "a1", i.e. for Nightly builds only.

This define was added in the Firefox 23 cycle.

MOZ_DEV_EDITION

This is defined when the beta/devedition build is built.

This define was added in the Firefox 35 cycle.

RELEASE_OR_BETA

This is defined when milestone.txt does not contain "a", i.e. for Beta and Release builds (and not Nightly).

This define was originally added in the Firefox 19 cycle, but was initially only defined in preference files. As of Firefox 23 it is defined globally. RELEASE_OR_BETA was originally named RELEASE_BUILD, but was changed in Firefox 52.

EARLY_BETA_OR_EARLIER

This is defined depending on the corresponding value in build/defines.sh. This file is managed manually by the release management team, with the variable being cleared once we're past the "early beta" point in the release cycle. It is usually done before the final beta build of week 2 ships during the cycle (typically beta 6).

This define was added in the Firefox 23 cycle.

  • Note: this flag is currently not defined for the JS build (bug 879836)

Usage

The aforementioned variables are mutually exclusive.

So for instance, if you wanted to enable a feature on Nightly and Dev, you'd have to use NIGHTLY_BUILD || MOZ_DEV_EDITION. Features using EARLY_BETA_OR_EARLIER will show up in Dev, but not consistently so (as with Beta), so EARLY_BETA_OR_EARLIER || MOZ_DEV_EDITION might make sense, depending.

(Also note there is intentionally no single variable covering Beta, as late Beta becomes/is Release.)

Other

You may also be interested in Platform/Platform-specific_build_defines