[OE-core] [PATCH 1/2] ccache: enable max size setup for ccache dir

Yannick GICQUEL yannick.gicquel at iot.bzh
Mon Jan 16 10:11:47 UTC 2017


2017-01-13 15:43 GMT+01:00 Burton, Ross <ross.burton at intel.com>:
>
> On 13 January 2017 at 14:23, Yannick Gicquel <yannick.gicquel at iot.bzh>
> wrote:
>>
>> +def init_ccache():
>> +    # dummy python version
>> +    return
>> +
>> +init_ccache() {
>> +    if [ -n "${CCACHE}" ]; then
>> +        ${CCACHE} -M ${CCACHE_MAX_SIZE}
>> +    fi
>> +}
>> +
>> +do_compile_prepend() {
>> +    init_ccache
>> +}
>
>
> That is horrible. :)

Thanks for your direct review :)

>
> Is it not possible to just pass -M[size] to ccache every time it's invoked?
> If it needs to be invoked on its own, then a do_compile[postfunc] or
> something to trim the size after a build would be neater.

I tried to pass -M option in CCACHE variable directly, but it breaks
host_gcc_version().

About cache size trimming, ccache does not support such feature. It
supports "forced cleanup", but as stated in the man page it's not
needed until user manually modify cache content. Keeping size limit ot
1GB is still possible, but as it is stored by default in TMPDIR why
doing so ? My assumption is that people who activates ccache will have
in mind it will consumes disk space (FYI, webkitgtk recipe requires
3.9GB)

Agree that using a "do_compile[prefuncs]" will be more compact than
the current proposal, i will prepare a V2 serie with this syntax.

Yannick

>
> Ross



More information about the Openembedded-core mailing list