[OpenWrt-Devel] [PATCH] build: improve ccache support
roman at advem.lv
Tue Jun 2 08:32:00 EDT 2020
On 2020-06-01 23:51, Petr Štetiar wrote:
> Roman Yeryomin <roman at advem.lv> [2020-06-01 18:32:26]:
>> Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR).
> this changes location of ccache directory (people would need to move
> symlink back or override it) and with CCACHE_BASEDIR it probably also
> invalidates the current cache/hashes, doesn't it?
I'm not 100% sure but for me it makes more sense to make separate ccache
dirs for each repo -- easier to manage and less corruption possibility.
> BTW you've missed following hardcoded patterns:
Hmm, missed that, will look.
>> This allows to do clean and dirclean.
> Isn't it desired to remove potentially broken ccache as well with
> clean/dirclean? Do I want to remove my config, downloads, feeds etc. in
> to remove ccache?
IMO it's desired to ccache host tools, which are cleaned only with
It's always possible to just rm -rf ./.ccache same as with ./tmp/
Of cause we can make another make target, like cacheclean but not sure
if it's worth doing.
>> +++ b/include/host-build.mk
>> + $(if $(CONFIG_CCACHE),$(1) : export
>> CCACHE_COMPILERCHECK:=%compiler% -dumpmachine; %compiler%
> you've missed to describe this change
This pattern was taken from package ccache, which looks sane to me. If
you have other opinion, please share.
>> rm -rf bin build_dir .config* dl feeds key-build* logs package/feeds
>> package/openwrt-packages staging_dir tmp
>> + rm -rf $(TOPDIR)/.ccache
> Other CCACHE_DIR variable occurencies can be overriden, this is
OK, this should be rm -rf $(CCACHE_DIR) probably.
> Michael Jones <mike at meshplusplus.com> [2020-06-01 13:34:51]:
>> Having build behavior change based on a symlink is undesirable.
> `make CCACHE_DIR=/whatever` should work as well
>> Additionally, having the ccache directory be a configuration option
>> it to persist across clones of the git repository, if the .config file
>> stored in git.
> BTW .config is .gitignored for a reason.
> Anyway, I don't think, that bloating the menu config with every Make
> from now on is desired. System has sane defaults and is flexible enough
> allow fine tunning if needed.
> -- ynezz
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
More information about the openwrt-devel