Build Firefox Faster with Artifact Builds

By  on  

Working on Firefox DevTools has always been a dream of mine, mostly because it feels like the ultimate way to give back to the development community and those that helped me become a success.  And when I explain who Mozilla is and people ask "Oh, so you work on Firefox?!", I can finally say "yes"!

Of course working on Firefox DevTools isn't without its problems, the biggest being that Firefox takes forever to build.  And its effect on a MacBook Pro's CPU?  Well...here's a recent photo of me building Firefox:

Build Firefox

Thankfully there's a faster way to build Firefox for local developer:  artifact builds.  Artifact builds allow you to use pre-built binaries to build Firefox for debugging DevTools (and other features) much more quickly.

Start by creating a mozconfig with the following contents:

# Automatically download and use compiled C++ components:
ac_add_options --enable-artifact-builds

# Write build artifacts to:
mk_add_options MOZ_OBJDIR=./objdir-frontend

The trigger a build using mach:

./mach clobber && ./mach build

# Use `./mach build faster` in the future

Firefox builds go from an hour (and potentially a call to the Fire Department) to just a few minutes.  If you're looking to help develop DevTools, Firefox, or simply have your own custom build of Firefox, jump on artifact builds -- these mozconfig directives are worth the time!

Recent Features

  • By
    Create a CSS Cube

    CSS cubes really showcase what CSS has become over the years, evolving from simple color and dimension directives to a language capable of creating deep, creative visuals.  Add animation and you've got something really neat.  Unfortunately each CSS cube tutorial I've read is a bit...

  • By
    How I Stopped WordPress Comment Spam

    I love almost every part of being a tech blogger:  learning, preaching, bantering, researching.  The one part about blogging that I absolutely loathe:  dealing with SPAM comments.  For the past two years, my blog has registered 8,000+ SPAM comments per day.  PER DAY.  Bloating my database...

Incredible Demos

  • By
    CSS :target

    One interesting CSS pseudo selector is :target.  The target pseudo selector provides styling capabilities for an element whose ID matches the window location's hash.  Let's have a quick look at how the CSS target pseudo selector works! The HTML Assume there are any number of HTML elements with...

  • By
    Introducing MooTools NextPrev

    One thing I love doing is duplicating OS functionalities. One of the things your OS allows you to do easily is move from one item to another. Most of the time you're simply trying to get to the next or the previous item.

Discussion

    Wrap your code in <pre class="{language}"></pre> tags, link to a GitHub gist, JSFiddle fiddle, or CodePen pen to embed!