lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi] Using ccache with lmi


From: Vadim Zeitlin
Subject: [lmi] Using ccache with lmi
Date: Tue, 12 Jul 2022 00:25:45 +0200

 Hello,
 
 I mentioned some time ago that I was working on improving the use of
ccache in the lmi CI builds but, just to clarify, the problems there are
specific to the CI environment: we have relatively limited amount of the
space for cache (to be fair to the free service provided by GitHub, it's
still pretty generous 10GB, but as I also cache third party libraries
builds, including wx, I don't want to use too much of it) and I want to
reuse the cache between compatible builds (== using the same compiler), but
not between the other ones.

 If you just want to use ccache locally, it works perfectly fine out of the
box: the only thing you need to do on Debian systems, other than installing
ccache package, of course, is to prepend /usr/lib/ccache to the PATH and --
this is the only lmi-specific part -- to MINIMAL_PATH, so that ccache
compiler wrappers are always used instead of the real compiler. After this,
you can just build as you always do, and the first build will take exactly
the same time as before (maybe even a tad longer, but I doubt it's going to
be noticeable). However the second build, even if it's a clean rebuild
should be lightning fast -- and you can run "ccache -s" to confirm that
there were a lot of cache hits (there will always be some cache misses too,
recent versions of ccache provide "-v" flag for more verbose output
allowing to see why do they happen).

 If you don't use ccache yet, I highly recommend starting to do it, even on
the fast machines not compiling something at all is still much faster than
compiling it. It does take a non negligible amount of space (and you might
want to increase the default cache size if "cache -s" shows that you're
using up all of it), but other than that it's just a free time gain.

 Please let me know if you have any questions about this or run into any
problems with using ccache,
VZ

Attachment: pgpvwxOwDPqHG.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]