diff options
| author | Danomi Manchego <danomimanchego123@gmail.com> | 2014-04-30 22:05:07 -0400 |
|---|---|---|
| committer | Thomas Petazzoni <thomas.petazzoni@free-electrons.com> | 2014-06-14 20:00:35 +0200 |
| commit | dd79f2dfae6db7f677bfb10b149ce67f294b91e2 (patch) | |
| tree | b206abae47e311d706851177cc6907445b8e58b0 /package/ccache | |
| parent | d93a0b402934309c632d4a825b7fe6183ce8c4c7 (diff) | |
| download | buildroot-dd79f2dfae6db7f677bfb10b149ce67f294b91e2.tar.gz buildroot-dd79f2dfae6db7f677bfb10b149ce67f294b91e2.zip | |
ccache: provide capability to do initial ccache setup
For example, if your project is known to require more space than the
default max cache size, then you might want to increase the cache size
to a suitable amount using the -M (--max-size) option.
The string you specify here is passed verbatim to ccache. Refer to
ccache documentation for more details.
These initial settings are applied after ccache has been compiled.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Reviewed-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Tested-by: Thomas De Schampheleire <thomas.de.schampheleire@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/ccache')
| -rw-r--r-- | package/ccache/ccache.mk | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk index df92c5e994..f1ec16257a 100644 --- a/package/ccache/ccache.mk +++ b/package/ccache/ccache.mk @@ -38,15 +38,25 @@ define HOST_CCACHE_PATCH_CONFIGURATION sed -i 's,"%s/.ccache","$(BR_CACHE_DIR)",' $(@D)/ccache.c endef -HOST_CCACHE_POST_CONFIGURE_HOOKS += \ - HOST_CCACHE_PATCH_CONFIGURATION +HOST_CCACHE_POST_CONFIGURE_HOOKS += HOST_CCACHE_PATCH_CONFIGURATION define HOST_CCACHE_MAKE_CACHE_DIR mkdir -p $(BR_CACHE_DIR) endef -HOST_CCACHE_POST_INSTALL_HOOKS += \ - HOST_CCACHE_MAKE_CACHE_DIR +HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_MAKE_CACHE_DIR + +# Provide capability to do initial ccache setup (e.g. increase default size) +BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP)) +ifneq ($(BR_CCACHE_INITIAL_SETUP),) +define HOST_CCACHE_DO_INITIAL_SETUP + @$(call MESSAGE,"Applying initial settings") + $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) + $(CCACHE) -s +endef + +HOST_CCACHE_POST_INSTALL_HOOKS += HOST_CCACHE_DO_INITIAL_SETUP +endif $(eval $(host-autotools-package)) |

