diff options
| author | Ross Burton <ross.burton@arm.com> | 2025-07-24 17:20:53 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-28 17:37:02 +0100 |
| commit | ddb29ce8314e171182da61325351efdb6b5d89f0 (patch) | |
| tree | 5b4ccaec32c91503105aeb5af235bb3a92dd03eb | |
| parent | 1f9f8187875d1cb20b5b6f0c4e242d56a0eea735 (diff) | |
| download | poky-ddb29ce8314e171182da61325351efdb6b5d89f0.tar.gz | |
ccache: move environment variables to the configuration file
Move some environment variables to the configuration file, so there's
less happening in the class.
Max_size was removed so that the per-recipe caches don't grown without
limit. The default cache is 5GB.
(From OE-Core rev: 8c1c38a6b3073d2dd34514f5a90805c12c0f42dd)
Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/classes/ccache.bbclass | 10 | ||||
| -rw-r--r-- | meta/conf/ccache.conf | 11 |
2 files changed, 9 insertions, 12 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass index 262db6672c..7c42e66bdf 100644 --- a/meta/classes/ccache.bbclass +++ b/meta/classes/ccache.bbclass | |||
| @@ -44,16 +44,6 @@ export CCACHE_CONFIGPATH ?= "${COREBASE}/meta/conf/ccache.conf" | |||
| 44 | 44 | ||
| 45 | export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}" | 45 | export CCACHE_DIR ?= "${CCACHE_TOP_DIR}/${MULTIMACH_TARGET_SYS}/${PN}" |
| 46 | 46 | ||
| 47 | # Fixed errors: | ||
| 48 | # ccache: error: Failed to create directory /run/user/0/ccache-tmp: Permission denied | ||
| 49 | export CCACHE_TEMPDIR ?= "${CCACHE_DIR}/tmp" | ||
| 50 | |||
| 51 | # We need to stop ccache considering the current directory or the | ||
| 52 | # debug-prefix-map target directory to be significant when calculating | ||
| 53 | # its hash. Without this the cache would be invalidated every time | ||
| 54 | # ${PV} or ${PR} change. | ||
| 55 | export CCACHE_NOHASHDIR ?= "1" | ||
| 56 | |||
| 57 | python() { | 47 | python() { |
| 58 | """ | 48 | """ |
| 59 | Enable ccache for the recipe | 49 | Enable ccache for the recipe |
diff --git a/meta/conf/ccache.conf b/meta/conf/ccache.conf index 499e5327b8..377eb42196 100644 --- a/meta/conf/ccache.conf +++ b/meta/conf/ccache.conf | |||
| @@ -1,7 +1,14 @@ | |||
| 1 | max_size = 0 | ||
| 2 | |||
| 3 | # Avoid spurious cache misses caused by recipe sysroot creation: Creating a | 1 | # Avoid spurious cache misses caused by recipe sysroot creation: Creating a |
| 4 | # recipe sysroot hardlinks all dependent files into place. Hardlinking updates | 2 | # recipe sysroot hardlinks all dependent files into place. Hardlinking updates |
| 5 | # the file's ctime which in turn interferes with ccache's include_file_ctime | 3 | # the file's ctime which in turn interferes with ccache's include_file_ctime |
| 6 | # check. | 4 | # check. |
| 7 | sloppiness = include_file_ctime | 5 | sloppiness = include_file_ctime |
| 6 | |||
| 7 | # We need to stop ccache considering the current directory or the | ||
| 8 | # debug-prefix-map target directory to be significant when calculating | ||
| 9 | # its hash. Without this the cache would be invalidated every time | ||
| 10 | # ${PV} or ${PR} change. | ||
| 11 | hash_dir = false | ||
| 12 | |||
| 13 | # If ccache runs under pseudo it will try to create files in /run/user/0/ccache-tmp | ||
| 14 | temporary_dir = $CCACHE_DIR/tmp | ||
