mirror of
https://git.yoctoproject.org/poky
synced 2026-05-30 00:20:08 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
0c98ff2c31
commit
e1cad77fa7
@@ -8,8 +8,28 @@
|
|||||||
# Add the following line to the recipe if it can't be built with ccache:
|
# Add the following line to the recipe if it can't be built with ccache:
|
||||||
# CCACHE_DISABLE = '1'
|
# CCACHE_DISABLE = '1'
|
||||||
#
|
#
|
||||||
|
# - Share ccache files between different builds
|
||||||
|
# Set CCACHE_TOP_DIR to a shared dir
|
||||||
|
# CCACHE_TOP_DIR = /path/to/shared_ccache/
|
||||||
|
#
|
||||||
|
# - TO debug ccahe
|
||||||
|
# export CCACHE_DEBUG = "1"
|
||||||
|
# export CCACHE_LOGFILE = "${CCACHE_DIR}/logfile.log"
|
||||||
|
# And also set PARALLEL_MAKE = "-j 1" to get make the log in order
|
||||||
|
#
|
||||||
|
|
||||||
export CCACHE_DIR ?= "${TMPDIR}/ccache/${MULTIMACH_TARGET_SYS}/${PN}"
|
# Set it to a shared location for different builds, so that cache files can
|
||||||
|
# be shared between different builds.
|
||||||
|
CCACHE_TOP_DIR ?= "${TMPDIR}/ccache"
|
||||||
|
|
||||||
|
# ccahe removes CCACHE_BASEDIR from file path, so that hashes will be the same
|
||||||
|
# in different builds.
|
||||||
|
export CCACHE_BASEDIR ?= "${TMPDIR}"
|
||||||
|
|
||||||
|
# Used for sharing cache files after compiler is rebuilt
|
||||||
|
export CCACHE_COMPILERCHECK ?= "%compiler% -dumpspecs"
|
||||||
|
|
||||||
|
export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}"
|
||||||
|
|
||||||
# We need to stop ccache considering the current directory or the
|
# We need to stop ccache considering the current directory or the
|
||||||
# debug-prefix-map target directory to be significant when calculating
|
# debug-prefix-map target directory to be significant when calculating
|
||||||
|
|||||||
Reference in New Issue
Block a user