For everything under that "repos" base_dir then ccache relative-izes
the build, so existing "monorepo-X" ccache entries can serve a new
"monorepo-Y" throwaway git worktree. The new "build" is then about 2
minutes for an up to date to date ccache
There's been some recent changes merged to make this work, concat-deps
and fix ups of "../../" style includes that otherwise defeat this, so
the repo has to be up to date or there are mysterious build failures.
wrt debugging: https://gerrit.collaboraoffice.com/c/online/+/3998 is
yet to be reviewed/merged to make the *debugging* of that build safe in
the face of a build using a ccache entry from a deleted worktree. With
that applied then gdb has to be launched from the root of the source
you want it to use for display (though this is scriptable in
~/.config/gdb/gdbinit so you don't have to think about it)
I've gotten a little bit carried away with this and have a cronjob that
builds a dedicated "clean" worktree nightly so the ccache should have
fresh "main" results in it if/when I rebase my personal worktrees.
Locally I'm using multiple git worktrees of debugging versions and a
shared ccache cache apparently successfully.
Ah - just trying to build that into the code itself
For everything under that "repos" base_dir then ccache relative-izes
the build, so existing "monorepo-X" ccache entries can serve a new
"monorepo-Y" throwaway git worktree. The new "build" is then about 2
minutes for an up to date to date ccache
Yep - my machine goes from one and a half hours to four and a half minutes with this for all builds.
I had to push a VPATH addition to the Makefile rules to ensure that 'make' in sub-directories didn't fall foul of the relative paths.
There's been some recent changes merged to make this work, concat-deps
and fix ups of "../../" style includes that otherwise defeat this, so
the repo has to be up to date or there are mysterious build failures.
I've gotten a little bit carried away with this and have a cronjob that
builds a dedicated "clean" worktree nightly so the ccache should have
fresh "main" results in it if/when I rebase my personal worktrees.
Heh seems even more 31337 to me; of course I only dip in and out of development; but sounds great.