logoalt Hacker News

evmartoday at 1:01 AM3 repliesview on HN

I’m not too familiar with Firefox builds. Why are clobber builds common? At first glance it seems weird to add a cache around your build system vs fixing your build system.


Replies

jagged-chiseltoday at 2:00 AM

Define “fixing.” If you’re building on ephemeral containers, an external cache is necessary for files that don’t change.

mbitsnbitestoday at 6:16 AM

Though I'm not actively working with Firefox so can't speak for their use cases, one important use case for clobber builds is CI.

I'm the author of BuildCache, and where I work we make thousands of clobber builds every day in our CI. Caching helps tremendously for keeping build times short.

There are a few use cases for local development too. For instance if you switch between git branches you may have to make near full rebuilds (e.g. in C++ if some header file is touched that gets included by many files).

Another advantage as a local dev is that you can tap into the central CI cache and when you pull the latest trunk and build it, chances are that the CI system has already built that version (e.g. as part of a merge gate) so you will get cache hits.

show 1 reply
secondcomingtoday at 7:13 AM

What even is a 'clobber build'?

show 1 reply