Commit d1bca7c4 authored by Tzu-Jung Lee's avatar Tzu-Jung Lee Committed by Peter Korsgaard
Browse files

ccache: expose control interface via 'make ccache-options'



usage:
	# set cache limit size
	make CCACHE_OPTIONS="--max-size=5G" ccache-options

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

[Peter: drop the redundant ifeq]
Signed-off-by: default avatarTzu-Jung Lee <tjlee@ambarella.com>
Acked-by: default avatarThomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: default avatarPeter Korsgaard <peter@korsgaard.com>
parent 96f70299
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -23,3 +23,14 @@ remove this directory.

You can get statistics on the cache (its size, number of hits,
misses, etc.) by running +make ccache-stats+.

The make target +ccache-options+ and the +CCACHE_OPTIONS+ variable
provide more generic access to the ccache. For example

-----------------
# set cache limit size
make CCACHE_OPTIONS="--max-size=5G" ccache-options

# zero statistics counters
make CCACHE_OPTIONS="--zero-stats" ccache-options
-----------------
+9 −0
Original line number Diff line number Diff line
@@ -44,4 +44,13 @@ $(eval $(host-autotools-package))
ifeq ($(BR2_CCACHE),y)
ccache-stats: host-ccache
	$(Q)$(CCACHE) -s

ccache-options: host-ccache
ifeq ($(CCACHE_OPTIONS),)
	$(Q)echo "Usage: make ccache-options CCACHE_OPTIONS=\"opts\""
	$(Q)echo "where 'opts' corresponds to one or more valid ccache options" \
	"(see ccache help text below)"
	$(Q)echo
endif
	$(Q)$(CCACHE) $(CCACHE_OPTIONS)
endif