diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-29 13:29:44 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-05-30 11:21:35 +0100 |
commit | 2acf8da4f13c175ea818b9514677b7059de1e3e2 (patch) | |
tree | e4e5d2a04f3c7030667273544ca13a23763e72e5 /meta/classes | |
parent | 0f81fbc0df73675aeb79c724858799a3b6a02f85 (diff) | |
download | openembedded-core-2acf8da4f13c175ea818b9514677b7059de1e3e2.tar.gz openembedded-core-2acf8da4f13c175ea818b9514677b7059de1e3e2.tar.bz2 openembedded-core-2acf8da4f13c175ea818b9514677b7059de1e3e2.zip |
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.
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/base.bbclass | 2 | ||||
-rw-r--r-- | meta/classes/ccache.bbclass | 5 | ||||
-rw-r--r-- | meta/classes/kernel-yocto.bbclass | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass index 79685f7e7d..9219170a30 100644 --- a/meta/classes/base.bbclass +++ b/meta/classes/base.bbclass @@ -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() { : diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass new file mode 100644 index 0000000000..10f9b9f9aa --- /dev/null +++ b/meta/classes/ccache.bbclass @@ -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}" diff --git a/meta/classes/kernel-yocto.bbclass b/meta/classes/kernel-yocto.bbclass index e931630510..2a3373c63a 100644 --- a/meta/classes/kernel-yocto.bbclass +++ b/meta/classes/kernel-yocto.bbclass @@ -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" |