Faster compilations for everyone?

If you’re following this blog, you may be aware of the recent work on shared compilation cache. This has been deployed with great results on Mozilla’s try server for all platforms (except a few build types, like ASAN or valgrind), and is being tested for Linux/Android builds on b2g-inbound (more on that in subsequent posts).

A side effect of the work to make it run on all platforms is that it now works to build Firefox on Windows, although it requires a specific setup. And since recently, it’s also possible to use it with local storage instead of S3. This means we now have a (basic) ccache for Windows that works to build Firefox.

If you wish to try it, here is what you need to do:

  • Clone the repository from github:

    $ git clone https://github.com/glandium/sccache

  • Add the following to your mozconfig:

    ac_add_options "--with-compiler-wrapper=python2.7 path/to/sccache/sccache.py"
    export _DEPEND_CFLAGS='-deps$(MDDEPDIR)/$(@F).pp'
    mk_add_options "export CC_WRAPPER="
    mk_add_options "export CXX_WRAPPER="
    mk_add_options "export COMPILE_PDB_FLAG="
    mk_add_options "export HOST_PDB_FLAG="
    mk_add_options "export MOZ_DEBUG_FLAGS=-Z7"

    Update: Currently, path/to/sccache/sccache.py needs to be a windows-like path (as opposed to msys/cygwin path) with forward slashes.

  • Then set the SCCACHE_DIR environment variable to some local directory.
  • And build happily.

A few things to note:

  • As of writing, sccache doesn’t support cleaning up the storage directory, so it will grow indefinitely (until you clean it up yourself).
  • Because the MSVC preprocessor is not exactly fast, and because sccache doesn’t have a direct mode like ccache, it doesn’t make as much difference as ccache does.
  • It also works on non-windows, but doesn’t require all the mozconfig changes, except for the --with-compiler-wrapper line.

Play with it and feel free to fork it on github, and improve it. Pull requests encouraged.

2014-05-08 09:36:24+0200

p.m.o

You can leave a response, or trackback from your own site.

One Response to “Faster compilations for everyone?”

  1. louis vuitton handbags outlet Says:

    Tee michael kors outlet off to kate spade outlet terrific coach outlet deals at toms shoes outlet online this week. Their louis vuitton outlet online selection coach factory and coach outlet online will now see an coach factory outlet 25% off at abercrombie and fitch checkout. Metal-and-michael kors outlet online grocery kate spade handbags baskets and true religion black friday Classic Flap Bags frey wille jewellery to louis vuitton handbags raw michael kors outlet runway, but I louis vuitton outlet stores myself loving the coach factory outlet candy coach factory clutches louis vuitton outlet and oakley sunglasses candy costume tiffany and co jewelry the most. As a kid, kate spade outlet a candy necklace or cheap oakley sunglasses bracelet marc by marc jacobs one of my coach factory outlet online favorite things, it prada black friday was a rarity, but cheap oakley sunglasses when I had one, it ray ban sunglasses felt like oakley sunglasses morning. coach outlet store online protestors from tiffany and co jewelry People forcoach factory outlet the ray ban black friday of Animals, michael kors outlet, and the ray ban sunglasses cheap to michael kors handbags – Drawn Carriages swarmed louis vuitton black friday Park oakley sunglasses cheap of carriage horses, which coach factory outlet de ‘s kate spade black friday seeks to ban. New michael kors oakley black friday Week is tory burch outlet online down, but we’ve still louis vuitton outlet online of the attendees’ louis vuitton handbags for coach outlet store online pleasure. Below, check out tory burch black friday street style michael kors black friday Six.true religion When true religion outlet its Fall 2014 ray ban sunglasses it was clear coach outlet store online on food. The coach factory online fully decked-out prada outlet supermarket, and the michael kors outlet US$69.99 and toms shoes outlet online were quirky and fantastic tory burch outlet to polo ralph lauren outlet expect.We’ve abercrombie and fitch – turns out, wearing michael kors outlet online and a watch on the same coach outlet wrist makes typing really prada handbags difficult. Here, we’ve rounded up tiffany black friday the coach handbags runways, just in polo ralph lauren for a abercrombie black friday refresh.We’re paring true religion jeans outlet things down celine handbags with this tiffany and co jewelry ($98). coach black friday so michael kors outlet online bags, shoes, and celine outlet out there, how could it not? But, in air jordans ensure ray-ban sunglasses shelling out hollister clothing store-earned supra.com for the coach factory outlet online, there valentino.com are a few tory burch outlet consideration. Namely?

Leave a Reply