summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobert Yang <liezhi.yang@windriver.com>2018-12-13 17:12:41 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-14 11:35:55 +0000
commite1cad77fa74c828cb08e620aaa4d804df829deeb (patch)
treeaeb9ca9d0a516aa5ed7092eadff655a470bba79d
parent0c98ff2c31d462ea139ebf1a3e0dbd97088d5466 (diff)
downloadpoky-e1cad77fa74c828cb08e620aaa4d804df829deeb.tar.gz
ccache.bbclass: Make it can be shared between different builds
CCACHE_BASEDIR: ccache removes this from file path, so that hashes will be the same in different build dirs. CCACHE_TOP_DIR: Set it to a shared location for different builds. (From OE-Core rev: 35d7fe73bba15de16d2eb0a4b12ef03b57b23306) Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/ccache.bbclass22
1 files changed, 21 insertions, 1 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 59e1022678..f3612c5019 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -8,8 +8,28 @@
8# Add the following line to the recipe if it can't be built with ccache: 8# Add the following line to the recipe if it can't be built with ccache:
9# CCACHE_DISABLE = '1' 9# CCACHE_DISABLE = '1'
10# 10#
11# - Share ccache files between different builds
12# Set CCACHE_TOP_DIR to a shared dir
13# CCACHE_TOP_DIR = /path/to/shared_ccache/
14#
15# - TO debug ccahe
16# export CCACHE_DEBUG = "1"
17# export CCACHE_LOGFILE = "${CCACHE_DIR}/logfile.log"
18# And also set PARALLEL_MAKE = "-j 1" to get make the log in order
19#
20
21# Set it to a shared location for different builds, so that cache files can
22# be shared between different builds.
23CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"
24
25# ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the same
26# in different builds.
27export CCACHE_BASEDIR ?= "${TMPDIR}"
28
29# Used for sharing cache files after compiler is rebuilt
30export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs"
11 31
12export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}" 32export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}"
13 33
14# We need to stop ccache considering the current directory or the 34# We need to stop ccache considering the current directory or the
15# debug-prefix-map target directory to be significant when calculating 35# debug-prefix-map target directory to be significant when calculating