This translation is incomplete. Please help translate this article from English
The mechanism used to build B2G OS has its own page. #Instructions only for B2G Operating System
The mechanism used to build Firefox for Android also has its own page.
The mechanism used to build Firefox for iOS also has its own github.
This page is about building Firefox Desktop
The Mozilla build system, like the rest of the Mozilla codebase, is cross-platform. It uses traditional Unix-style autoconf and make tools to build the various applications (even on non-unix operating systems).
Because the Mozilla codebase builds many different applications and has many options, it is complex to use and learn. Please read these instructions carefully before attempting a build.
These build pages are for the projects which use the autoconf-based build system: Firefox, Thunderbird, Mozilla Suite / SeaMonkey, XULRunner, Sunbird, and standalone Composer.
If you are having build problems, please post questions to the newsgroup mozilla.dev.builds (access via Google Groups). Make your post as precise as possible, including details about your operating system, your mozconfig/configure flags, and the precise error you are experiencing.
You may also want to check the TreeHerder to make sure the product you are working with is currently compiling in your environment.
For the impatient
The quickest way to build Mozilla is to use the instructions at the simple build pages:
For more detail, see below.
Before you try to build, make sure you have the correct tools, and have configured these tools correctly.
Get the source
- Download Mozilla Source Code
- Source code for releases is available for download via FTP/HTTP.
- Mozilla Source Code via Mercurial
- Those doing active development on Firefox can check out the latest source using Mercurial. This is the preferred method if you plan to provide patches and fix bugs, as it lets you get up-to-the-minute changes and merge them with your own.
- Comm-central Source Code via Mercurial
- Those doing active development on Thunderbird/SeaMonkey/Firefox can check out the latest source using Mercurial. This method includes all the code for the applications mentioned, so you can work on Firefox development, and still build Thunderbird or SeaMonkey as well.
Configuring build options
Running configure and make with the default options will not give you a good working build. You should use a
.mozconfig file to obtain a reasonable release build. Please read Configuring Build Options carefully before building.
Build and install
After setting up your environment, downloading the source, and configuring the build, refer to the following per-app instructions on how to build:
Random FAQs and Developer Documentation
- Mozilla Build FAQ
- Adding Files to the Build
- Adding Components
- Creating a Release Tag
- Cross-Compiling Mozilla
- Compiling 32-bit Firefox on a Linux 64-bit OS
- Mozilla Release Checklist
- Clang Static Analysis
- Package Filename Convention
- Building with Profile-Guided Optimization
- Building Firefox with Debug Symbols
- Building only SpiderMonkey
- Building Firefox with Rust Code
- Notes on how mozilla.org does release builds (circa 2007)