[OpenWrt-Devel] [PATCH] build: improve ccache support

Michael Jones mike at meshplusplus.com
Mon Jun 1 13:11:40 EDT 2020


On Mon, Jun 1, 2020 at 10:33 AM Roman Yeryomin <roman at advem.lv> wrote:

> Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR).
> This allows to do clean and dirclean. Cache hit rate for test build
> after dirclean is ~65%.
> If CCACHE is enabled stats are printed out at the end of building process.
>
> Signed-off-by: Roman Yeryomin <roman at advem.lv>
>

This certainly looks like an improvement.

However, there is an important usage case that this change doesn't address.

Frequently when I am working on OpenWRT related things, I have many
different workspaces all tied to the same git repository hosted externally.
The reason for this is to allow multiple builds to live and run
independently.

Having the CCACHE_DIR be located *inside* the repository doesn't share the
cache between multiple workspaces.

So can the CCACHE_DIR be made configurable at build time based on the
.config file? Perhaps it can default to this, and only be set to the value
in .config if provided? For my purposes, I would always set the CCACHE_DIR
to a path that all of my workspaces use.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20200601/6bcf1f4e/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list