Open-Source Wikis

/

Gecko

/

Reference

/

Configuration

mozilla/gecko-dev

Configuration

Firefox can be configured at three layers: build configuration (compile-time), prefs (run-time, user-visible), and enterprise policies (org-managed, run-time).

Build configuration

The .mozconfig file in the source root (or pointed to by MOZCONFIG) sets compile-time options:

ac_add_options --enable-debug
ac_add_options --enable-application=browser
ac_add_options --enable-artifact-builds
ac_add_options --enable-warnings-as-errors
ac_add_options --with-libclang-path=/path/to/libclang
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-debug

Options are declared in moz.configure plus the per-subsystem configures under build/moz.configure/.

Common options:

  • --enable-application=browser|mobile/android — what to build.
  • --enable-debug / --disable-optimize — debug build.
  • --enable-release — release-mode build (matches what ships).
  • --enable-artifact-builds — fetch prebuilt platform binaries.
  • --enable-address-sanitizer, --enable-thread-sanitizer, --enable-undefined-sanitizer.
  • --with-app-name, --with-app-basename — branding.
  • --enable-warnings-as-errors.

Run-time prefs

Prefs are key/value settings stored in the profile's prefs.js. UI: about:config. Defaults come from per-component .js files (e.g., modules/libpref/init/all.js, browser/app/profile/firefox.js, mobile/android/app/geckoview-prefs.js). High-frequency prefs use StaticPrefs (see primitives/prefs.md).

Useful pref namespaces:

Prefix Topic
app.* Application identity / update
browser.* Desktop UI
dom.* DOM features (often spec gates)
extensions.* Extensions runtime
network.* HTTP/DNS/sockets
privacy.* Anti-tracking, fingerprinting
security.* TLS, sandbox, permissions
gfx.* Graphics + WebRender
devtools.* DevTools
media.* Codecs, autoplay
fission.* Site isolation

Enterprise policies

browser/components/enterprisepolicies/ implements admin-managed policies (delivered via Group Policy on Windows, plist on macOS, or policies.json on Linux). These pin or override prefs and toggle UI features. The full schema is in Policies.json.

Build IDs and channels

mozilla-config.h.in produces a mozilla-config.h with version + build ID at compile time. The active channel is set by MOZ_UPDATE_CHANNEL and app.update.channel and is baked into the build.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Configuration – Gecko wiki | Factory