ccache: Separate out into its own class
Currently, ccache is used if it is present. When building from scratch it gives no performance improvement and creates a ton of empty directories even when its not in use. This change moves ccache support to a bbclass file which the user can choose to enable. This should make builds more determinstic and make it easier/clearer to the end user when its being used and when it is not. (From OE-Core rev: 2acf8da4f13c175ea818b9514677b7059de1e3e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
parent
a92ff3ad42
commit
0299499770
|
@ -271,7 +271,7 @@ python base_eventhandler() {
|
|||
}
|
||||
|
||||
addtask configure after do_patch
|
||||
do_configure[dirs] = "${CCACHE_DIR} ${S} ${B}"
|
||||
do_configure[dirs] = "${S} ${B}"
|
||||
do_configure[deptask] = "do_populate_sysroot"
|
||||
base_do_configure() {
|
||||
:
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}"
|
||||
export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
|
||||
|
||||
do_configure[dirs] =+ "${CCACHE_DIR}"
|
||||
do_kernel_configme[dirs] =+ "${CCACHE_DIR}"
|
|
@ -161,7 +161,7 @@ do_kernel_checkout[dirs] = "${S}"
|
|||
|
||||
addtask kernel_checkout before do_patch after do_unpack
|
||||
|
||||
do_kernel_configme[dirs] = "${CCACHE_DIR} ${S} ${B}"
|
||||
do_kernel_configme[dirs] = "${S} ${B}"
|
||||
do_kernel_configme() {
|
||||
echo "[INFO] doing kernel configme"
|
||||
|
||||
|
|
|
@ -409,10 +409,9 @@ export PATH
|
|||
# Build utility info.
|
||||
##################################################################
|
||||
|
||||
CCACHE = "${@bb.which(d.getVar('PATH', True), 'ccache') and 'ccache '}"
|
||||
CCACHE ??= ""
|
||||
TOOLCHAIN_OPTIONS = " --sysroot=${STAGING_DIR_TARGET}"
|
||||
|
||||
export CCACHE_DIR = "${TMPDIR}/ccache/${MULTIMACH_HOST_SYS}/${PN}"
|
||||
export CC = "${CCACHE}${HOST_PREFIX}gcc ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
|
||||
export CXX = "${CCACHE}${HOST_PREFIX}g++ ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
|
||||
export F77 = "${CCACHE}${HOST_PREFIX}g77 ${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS}"
|
||||
|
@ -746,7 +745,7 @@ BB_CONSOLELOG ?= "${TMPDIR}/cooker.log.${DATETIME}"
|
|||
|
||||
# Setup our default hash policy
|
||||
BB_SIGNATURE_HANDLER ?= "OEBasic"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN"
|
||||
BB_HASHBASE_WHITELIST ?= "TMPDIR FILE PATH PWD BB_TASKHASH BBPATH DL_DIR SSTATE_DIR THISDIR FILESEXTRAPATHS FILE_DIRNAME HOME LOGNAME SHELL TERM USER FILESPATH STAGING_DIR_HOST STAGING_DIR_TARGET COREBASE PRSERV_HOST PRSERV_PORT PRSERV_DUMPDIR PRSERV_DUMPFILE PRSERV_LOCKDOWN PARALLEL_MAKE CCACHE_DIR EXTERNAL_TOOLCHAIN CCACHE"
|
||||
BB_HASHCONFIG_WHITELIST ?= "${BB_HASHBASE_WHITELIST} DATE TIME SESSION_MANAGER DBUS_SESSION_BUS_ADDRESS SSH_AGENT_PID XDG_SESSION_COOKIE SSH_AUTH_SOCK XAUTHORITY"
|
||||
|
||||
MLPREFIX ??= ""
|
||||
|
|
Loading…
Reference in New Issue