Builders Corner

This page contains information that I use from time to time when building that may be helpful to other builders as well. It's just a miscellaneous list of information that of the type that used to be posted on the pryan.org forums. I'm in the process of reorganizing the links here to categorize them as things can be hard to find.

Building Mozilla
BugZilla
Mercurial
Forums

64-Bit Windows
mozilla blog
mozilla wiki
CVStools


Mozilla Links

CVS Tags

When you checkout code using a command like cvs co -r FIREFOX_1_0_1_RELEASE mozilla/client.mk mozilla/browser/config it pulls the code for a particular release. Sometimes I need to pull the code for a release or milestone build but forget the tag so here's a list of tags that may be useful in the future.

Release or Milestone Tag
Firefox Release 1.0.1 FIREFOX_1_0_1_RELEASE
Firefox Release 1.0.2 FIREFOX_1_0_2_RELEASE
Firefox Release 1.0.3 FIREFOX_1_0_3_RELEASE
Firefox Release 1.0.4 FIREFOX_1_0_4_RELEASE
Firefox Release 1.0.5 FIREFOX_1_0_5_RELEASE
Firefox Release 1.0.6 FIREFOX_1_0_6_RELEASE
Firefox Release 1.0.6 FIREFOX_1_0_7_RELEASE
Firefox 1.5 Release Candidate 3 FIREFOX_1_5rc3_RELEASE
Thunderbird 1.5 Release Candidate 1 THUNDERBIRD_1_5rc1_RELEASE
Firefox 1.5 Branch (This is what I use; correct me if I'm wrong) MOZILLA_1_8_BRANCH
Firefox 1.5 Release FIREFOX_1_5_RELEASE
Thunderbird 1.5 Release THUNDERBIRD_1_5_RELEASE
Firefox 1.5.0.1 Release FIREFOX_1_5_0_1_RELEASE
Firefox 2.0.0.4 Release FIREFOX_2_0_0_4_RELEASE


Firefox Build Id

For versions 1.5 and beyond, I've found that creating a file called all_w64.js with the following line in it works if copied to dist\bin\defaults\pref\all.js.

pref("general.useragent.extra.firefox", "mmoy CE Deer Park Alpha 2 K8M/64-X07");

I have a script that looks like this:

copy all_w64.js f:\mozilla\mozilla\dist\bin\defaults\pref\all.js
start xemacs f:\mozilla\mozilla\dist\bin\defaults\pref\all.js

which copies in the file and brings up the target file in the editor so that I can update the Build Id.

For the release versions in the 1.0.* series, I have a file names all.js that contains:

pref("general.useragent.vendorComment", "mmoy CE Deer Park Alpha 2 K8M/64-X03");

My script copies this file to dist\bin\defaults\pref\all.js and then edits the target file. My script contains:

copy all.js f:\mozilla\mozilla\dist\bin\defaults\pref\all.js
start xemacs f:\mozilla\mozilla\dist\bin\defaults\pref\all.js

Thunderbird Build Id

I don't build Thunderbird very often and have found it difficult to modify the ID String. Others have provided me with various ways to do this but none of them seem to work for me so I developed a way to do it so that it shows up as text in the about screen. You just have to be careful to not use too many characters or it will run off the end. Here's the patch. Just change the mmoy CE Win64 1.5RC1 to whatever you want.

Index: aboutDialog.xul
===================================================================
RCS file: /cvsroot/mozilla/mail/base/content/aboutDialog.xul,v
retrieving revision 1.18.2.3
diff -u -r1.18.2.3 aboutDialog.xul
--- aboutDialog.xul     18 Oct 2005 23:36:44 -0000      1.18.2.3
+++ aboutDialog.xul     24 Nov 2005 01:43:09 -0000
@@ -63,7 +63,7 @@
       <![CDATA[
         function onLoad() {
           var versionField = document.getElementById("versionField");
-          versionField.value = versionField.value + ' (' + navigator.productSub + ')';
+          versionField.value = versionField.value + ' (mmoy CE Win64 1.5RC1)';

           var button = document.documentElement.getButton("extra2");
           button.setAttribute("label", document.documentElement.getAttribute("creditslabel"));

MAC/OSX packaging

make -C objdir/browser/installer

Building Firefox with Intel's C Compiler on Windows

I didn't find directions for doing this and I wanted to give this a try to see what the performance improvements would be like as ICC is generally acknowledged to be the best in performance over GCC and MSVC on Windows. I did a little testing and found that ICC is much better at loop-unrolling using SIMD instructions. ICC also provides support for SSSE3 and SSE4 and my guess is that it will also do autovectorization for these two instruction set additions. VS2008 doesn't do autovectorization above SSE2 and I haven't been impressed by the autovectorization capabilities in VS2003 and VS2005. Intel also has a bunch of performance libraries that might be useful.

Intel has a 30-day free trial of their compiler and tuning products so go to their website and grab the compiler if you don't already have it. They also have a great student bundle for $129 which gives you near $3,000 of software. Great if you're a student, teacher, etc. If you don't have a way in, the compiler is very expensive for just playing around with Firefox builds.

These are my instructions so far. I don't have a working build yet but I need to record what I'm doing so that I can do it again.
  1. Install the compiler and any tools that you want
  2. Put this in your .mozconfig as Intel has different commands for their compiler and toolsCC=icl
    CPP=icl
    CXX=icl
    CXXCPP=icl
    LD=xilink
    AR=xilib
    export CC
    export CXX
    export CPP
    export CXXCPP
    export LD
    export AR
  3. Grab the static moztools from the mozilla build page if building 2.0 or higher. Windows Build Prerequisites (1.7 & 1.8 Branches) I'm not sure as to what you use for the trunk. If this doesn't work, then you'll need to build your own moztools from scratch using icc.
  4. Update the moztools environment variables in your setup file and/or mozconfig file.
  5. Apply the patches at http://vector64.com/firefoxicc.patches to use the Intel tools. These tools are subject to change at any time. patch -p0 < f:\mozilla\firefoxicc.patches
  6. Run your build.
Notes:

Proprietary code in my builds

I may use proprietary code in my builds that either I own or that I have the rights to use but don't have the rights to distribute. I generally wall off this code in my patches using conditional compilation symbols though the presence of a conditional compilation symbol doesn't necessarily indicate proprietary code as I do use compilation symbols to control platforms and to test new code.

Any proprietary code that I use does not fall under the MPL/GPL.

At the moment, there is very little of this kind of code used.


Return to Homepage
Updated July 15, 2009. For comments and questions, send email to Vector.x64 @ gmail.com (without the spaces).