Simple instructions for building Firefox from source

In the past, figuring out how to build Firefox from source tended to be really confusing. The documentation explained too much about how the build system worked, how multiple projects were built, presented too many choices, and generally had lots of details not relevant to most people.

There are still multiple steps (especially if you’re on Windows), but it’s a lot more streamlined than other documentation and is geared towards doing cut’n’paste. In a nutshell, it’s a lot less intimidating.

4 Responses to Simple instructions for building Firefox from source

It is good to know that, according to this page, it is impossible to build Firefox with PGO (profile-guided optimizations) on Windows without Microsoft Visual C++ 2005 Professional Edition. Or, in other words, it is impossible to create highly optimized builds (as Mozilla distributes) without buying a (rather expensive) compiler from Microsoft.

There’s two types of optimizations you can make when compiling: the type where you ask the compiler to make an “optimized” build based on heuristics, and the type where you ask the compiler to build a profile of a compilation pass and then use that profile to optimize the final product.

The first type, optimized builds, are indeed possible with the free tools.

BartZ is right; the second type, profile optimized builds, aren’t supported with the free tools. If someone were to build a free profile optimized compiler, we’d definitely love it and point to it. Or if MSFT were to make their free tools support profile guided optimization, we’d love that, too. Presently, though, they don’t.

While this means that it’s impossible to build PGO builds at home without paying for Visual Studio, I don’t think that’s a huge problem since you can build an optimized build, the tools to get a PGO build are available (for money) and you can always download a PGO’d hourly or generate your own PGO build using tryserver if you have commit access.