[oe] [meta-oe][PATCH 1/2] ccache: enable max size setup for ccache dir

Yannick GICQUEL yannick.gicquel at iot.bzh
Fri Jan 13 14:45:25 UTC 2017


Hi Martin,

Sorry for pollution, my mistake. I posted them on the right list.

Thanks,
Yannick

2017-01-13 15:33 GMT+01:00 Martin Jansa <martin.jansa at gmail.com>:
> Patches for oe-core needs to go to openembedded-core ML.
>
> On Fri, Jan 13, 2017 at 3:00 PM, Yannick Gicquel <yannick.gicquel at iot.bzh>
> wrote:
>
>> ccache directories are limited to 1G by default.
>> This patch enables the configuration of their limits, and as default
>> location is TMPDIR, it proposes a size limit to "0" (unlimited).
>>
>> The setup can be overloaded in local.conf by setting
>> CCACHE_MAX_SIZE to a custom value if needed.
>>
>> Signed-off-by: Yannick Gicquel <yannick.gicquel at iot.bzh>
>> ---
>>  meta/classes/ccache.bbclass | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
>> index 93fcaca..8a80040 100644
>> --- a/meta/classes/ccache.bbclass
>> +++ b/meta/classes/ccache.bbclass
>> @@ -1,6 +1,21 @@
>>  CCACHE = "${@bb.utils.which(d.getVar('PATH'), 'ccache') and 'ccache '}"
>>  export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
>>  CCACHE_DISABLE[unexport] = "1"
>> +CCACHE_MAX_SIZE ?= "0"
>>
>>  do_configure[dirs] =+ "${CCACHE_DIR}"
>>  do_kernel_configme[dirs] =+ "${CCACHE_DIR}"
>> +
>> +def init_ccache():
>> +    # dummy python version
>> +    return
>> +
>> +init_ccache() {
>> +    if [ -n "${CCACHE}" ]; then
>> +        ${CCACHE} -M ${CCACHE_MAX_SIZE}
>> +    fi
>> +}
>> +
>> +do_compile_prepend() {
>> +    init_ccache
>> +}
>> --
>> 1.9.1
>>
>> --
>> _______________________________________________
>> Openembedded-devel mailing list
>> Openembedded-devel at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-devel
>>
> --
> _______________________________________________
> Openembedded-devel mailing list
> Openembedded-devel at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-devel



More information about the Openembedded-devel mailing list