From MozillaWiki
Jump to: navigation, search

Contributing to Mozilla Firefox

Step 1: Make a simple build

sudo apt-get install mercurial
hg clone
cd mozilla-central
./mach bootstrap

create mozconfig

# Import the stock config for building the browser (Firefox)
. $topsrcdir/browser/config/mozconfig

# Define where build files should go. This places them in the directory
# "obj-ff-dbg" under the current source directory
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-ff-dbg

# -s makes builds quieter by default
# -j4 allows 4 tasks to run in parallel. Set the number to be the amount of
# cores in your machine. 4 is a good number.
mk_add_options MOZ_MAKE_FLAGS="-j4"
mk_add_options AUTOCONF=autoconf2.13
#mk_add_options AUTOCLOBBER=1
# Enable debug builds
ac_add_options --enable-debug

# Turn off compiler optimization. This will make applications run slower,
# will allow you to debug the applications under a debugger, like GDB.
ac_add_options --disable-optimize

# Only enable this if you have binutils-gold installed
# ac_add_options --enable-gold

ac_add_options --enable-warnings-as-errors
ac_add_options --enable-visual-event-tracer

#ac_add_options --enable-crash-on-assert

./mach build
./mach run

Step 2: Find a bug


Create a .hgrc file in your home folder

username = Name <>

qnew = -Ue

[extensions] =
hgext.purge =

branchdiff = diff -r "max(ancestors('$1') and branch(default)):'$1'"

git = 1
showfunc = 1
unified = 8