Patchwork [1/1] ccache: expose control interface via 'make ccache-options'

login
register
mail settings
Submitter Tzu-Jung Lee
Date June 18, 2012, 3:50 a.m.
Message ID <1339991408-25620-1-git-send-email-tjlee@ambarella.com>
Download mbox | patch
Permalink /patch/165382/
State Superseded
Headers show

Comments

Tzu-Jung Lee - June 18, 2012, 3:50 a.m.
usage:
	# set cache limit size
	make CCACHE_OPTIONS="--max-size=5G" ccache-options

	# zero statistics counters
	make CCACHE_OPTIONS="--zero-stats" ccache-options

Change-Id: I0162a2612a9aa4afd49f6d93c9c36dce3e0c8228
---
 package/ccache/ccache.mk |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Tzu-Jung Lee - June 19, 2012, 12:51 p.m.
On Mon, Jun 18, 2012 at 11:50 AM, Tzu-Jung Lee <roylee17@gmail.com> wrote:
> usage:
>        # set cache limit size
>        make CCACHE_OPTIONS="--max-size=5G" ccache-options
>
>        # zero statistics counters
>        make CCACHE_OPTIONS="--zero-stats" ccache-options
>
> Change-Id: I0162a2612a9aa4afd49f6d93c9c36dce3e0c8228
> ---
>  package/ccache/ccache.mk |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
> index d7106ee..d46fbb9 100644
> --- a/package/ccache/ccache.mk
> +++ b/package/ccache/ccache.mk
> @@ -50,3 +50,7 @@ ccache-stats: host-ccache
>        $(Q)$(CCACHE) -s
>  endif
>
> +ifeq ($(BR2_CCACHE),y)
> +ccache-options: host-ccache
> +       $(Q)$(CCACHE) $(CCACHE_OPTIONS)
> +endif
> --
> 1.7.8.6
>

Hi Guys,

Any comment on this?

Regards,
Roy
Tzu-Jung Lee - Oct. 7, 2013, 10:09 p.m.
# Response to patchwork cleanup of week #1

This patch provides an easy way to operate on buildroot ccache such as
changing the cache limit or showing statistics.

Without it, users would have to explicitly specify both the environment variable
and the path of patched ccache, for example:

  BUILDROOT_CACHE_DIR=~/.buildroot-ccache/ $PWD/host/usr/bin/ccache -s
.
Thanks.

Roy

On Fri, Jun 22, 2012 at 7:55 PM, Tzu-Jung Lee <roylee17@gmail.com> wrote:
> ---------- Forwarded message ----------
> From: Tzu-Jung Lee <roylee17@gmail.com>
> Date: Mon, Jun 18, 2012 at 11:50 AM
> Subject: [PATCH 1/1] ccache: expose control interface via 'make ccache-options'
> To: buildroot@busybox.net
> Cc: roylee17@gmail.com, Tzu-Jung Lee <tjlee@ambarella.com>
>
>
> usage:
>        # set cache limit size
>        make CCACHE_OPTIONS="--max-size=5G" ccache-options
>
>        # zero statistics counters
>        make CCACHE_OPTIONS="--zero-stats" ccache-options
>
> Change-Id: I0162a2612a9aa4afd49f6d93c9c36dce3e0c8228
> ---
>  package/ccache/ccache.mk |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
> index d7106ee..d46fbb9 100644
> --- a/package/ccache/ccache.mk
> +++ b/package/ccache/ccache.mk
> @@ -50,3 +50,7 @@ ccache-stats: host-ccache
>        $(Q)$(CCACHE) -s
>  endif
>
> +ifeq ($(BR2_CCACHE),y)
> +ccache-options: host-ccache
> +       $(Q)$(CCACHE) $(CCACHE_OPTIONS)
> +endif
> --
> 1.7.8.6
Arnout Vandecappelle - Oct. 8, 2013, 6:46 a.m.
On 10/08/13 00:09, Tzu-Jung Lee wrote:
> # Response to patchwork cleanup of week #1
>
> This patch provides an easy way to operate on buildroot ccache such as
> changing the cache limit or showing statistics.
>
> Without it, users would have to explicitly specify both the environment variable
> and the path of patched ccache, for example:
>
>    BUILDROOT_CACHE_DIR=~/.buildroot-ccache/ $PWD/host/usr/bin/ccache -s
> .
> Thanks.
>
> Roy
>
> On Fri, Jun 22, 2012 at 7:55 PM, Tzu-Jung Lee <roylee17@gmail.com> wrote:
>> ---------- Forwarded message ----------
>> From: Tzu-Jung Lee <roylee17@gmail.com>
>> Date: Mon, Jun 18, 2012 at 11:50 AM
>> Subject: [PATCH 1/1] ccache: expose control interface via 'make ccache-options'
>> To: buildroot@busybox.net
>> Cc: roylee17@gmail.com, Tzu-Jung Lee <tjlee@ambarella.com>
>>
>>
>> usage:
>>         # set cache limit size
>>         make CCACHE_OPTIONS="--max-size=5G" ccache-options
>>
>>         # zero statistics counters
>>         make CCACHE_OPTIONS="--zero-stats" ccache-options

  You should add this text to the documentation in
docs/manual/ccache-support.txt

>>
>> Change-Id: I0162a2612a9aa4afd49f6d93c9c36dce3e0c8228

  Missing Signed-off-by line.

  Otherwise looks good to me.

  Regards,
  Arnout

>> ---
>>   package/ccache/ccache.mk |    4 ++++
>>   1 files changed, 4 insertions(+), 0 deletions(-)
>>
>> diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
>> index d7106ee..d46fbb9 100644
>> --- a/package/ccache/ccache.mk
>> +++ b/package/ccache/ccache.mk
>> @@ -50,3 +50,7 @@ ccache-stats: host-ccache
>>         $(Q)$(CCACHE) -s
>>   endif
>>
>> +ifeq ($(BR2_CCACHE),y)
>> +ccache-options: host-ccache
>> +       $(Q)$(CCACHE) $(CCACHE_OPTIONS)
>> +endif
>> --
>> 1.7.8.6
> _______________________________________________
> buildroot mailing list
> buildroot@busybox.net
> http://lists.busybox.net/mailman/listinfo/buildroot
>
>
Thomas Petazzoni - Oct. 8, 2013, 7:11 a.m.
Dear Tzu-Jung Lee,

On Mon, 7 Oct 2013 15:09:34 -0700, Tzu-Jung Lee wrote:
> # Response to patchwork cleanup of week #1
> 
> This patch provides an easy way to operate on buildroot ccache such as
> changing the cache limit or showing statistics.
> 
> Without it, users would have to explicitly specify both the environment variable
> and the path of patched ccache, for example:
> 
>   BUILDROOT_CACHE_DIR=~/.buildroot-ccache/ $PWD/host/usr/bin/ccache -s

Well, in the case of just passing "-s", we already have the
ccache-stats target.

But I agree that for all other options, adding another
ccache-<something> target would be impractical, so probably your
proposal of CCACHE_OPTIONS makes sense.

Can you respin your patch on top of the latest master, and add an
update to the manual (we already have a section about ccache support,
see http://buildroot.org/downloads/manual/manual.html#ccache).

Thanks!

Thomas

Patch

diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
index d7106ee..d46fbb9 100644
--- a/package/ccache/ccache.mk
+++ b/package/ccache/ccache.mk
@@ -50,3 +50,7 @@  ccache-stats: host-ccache
 	$(Q)$(CCACHE) -s
 endif
 
+ifeq ($(BR2_CCACHE),y)
+ccache-options: host-ccache
+	$(Q)$(CCACHE) $(CCACHE_OPTIONS)
+endif