Sunday 17 October 2010

Using pymake to build mozilla on Windows

A number of people, myself included, have had trouble getting pymake to build Mozilla on Windows. Roc discovered the trick to getting it to work: use relative paths in the mozconfig. For example, my mozconfig (which lives in $srcdir/mozconfig) for a debug build is:

. $topsrcdir/browser/config/mozconfig
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/objdir
ac_add_options --enable-debug
ac_add_options --disable-optimize
ac_add_options --enable-tests

I then build with the commands:

cd $srcdir/objdir
export SHELL; time python -O ../build/pymake/ -f ../ -j4

It takes about 26 minutes to build on my Core i7  M620. A normal build is about 50 minutes.


Unknown said...

I'm a little disappointed that this is considered a trick when it's clearly documented on

Chris Pearce said...

@khuey: I understand your concern. Last time I looked at the pymake documentation (2 months ago?) the info there didn't produce a working build for me, and I hadn't checked back since. It's unlikey people poll the documentation for updates. Consider this as advertising for the documentation! ;)

Unknown said...

Fair enough. FWIW, we landed patches Friday that should make a regular build work ;-) I'll verify and blog soon.