From 2ca084ccaae619ac8031e902c66817d021ac6fd5 Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Fri, 12 Jun 2020 21:43:46 +0300 Subject: build: improve ccache support Set CCACHE_DIR to $(TOPDIR)/.ccache and CCACHE_BASEDIR to $(TOPDIR). This allows to do clean and dirclean. Cache hit rate for test build after dirclean is ~65%. If CCACHE is enabled stats are printed out at the end of building process. CCACHE_DIR config variable allows to override default, which could be useful when sharing cache with many builds. cacheclean make target allows to clean the cache. Changes from v1: - remove ccache directory using CCACHE_DIR variable - remove ccache leftovers from sdk and toolchain make files - introduce CONFIG_CCACHE_DIR variable - introduce cacheclean make target Signed-off-by: Roman Yeryomin --- config/Config-devel.in | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'config') diff --git a/config/Config-devel.in b/config/Config-devel.in index 70ec0ce9a7..11741c7070 100644 --- a/config/Config-devel.in +++ b/config/Config-devel.in @@ -69,6 +69,13 @@ menuconfig DEVEL help Compiler cache; see https://ccache.samba.org/ + config CCACHE_DIR + string "Set ccache directory" if CCACHE + default "" + help + Store ccache in this directory. + If not set, uses './.ccache' + config EXTERNAL_KERNEL_TREE string "Use external kernel tree" if DEVEL default "" -- cgit v1.2.3