summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-08-07 19:50:45 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-08-11 18:04:25 +0100
commit530ceee676cacc238def5b3cb109f9a1f2686892 (patch)
tree3d6422a5cbde738caa735ff80f33749696a576d1 /meta/classes
parentcaf58debdd1d3d71c5f20309da2f403f021b55ce (diff)
downloadpoky-530ceee676cacc238def5b3cb109f9a1f2686892.tar.gz
ccache: do not use ccache if it is explicitly forbidden
Some recipes explicitly disable ccache via CCACHE_DISABLE variable since they are known issues with ccache in those recipes. This setting should not be ignored also when ccache in in HOSTOOLS. Rework a hard to read if clause so that it is in format if (not CCACHE_DISABLE and (cond1 or cond2 or cond2)): (From OE-Core rev: 2ea0f82e5f9bb21d21503ed06cf74153ae8cbcc7) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/ccache.bbclass6
1 files changed, 3 insertions, 3 deletions
diff --git a/meta/classes/ccache.bbclass b/meta/classes/ccache.bbclass
index 5ce23e50f3..f6bd972ff4 100644
--- a/meta/classes/ccache.bbclass
+++ b/meta/classes/ccache.bbclass
@@ -51,10 +51,10 @@ python() {
51 Enable ccache for the recipe 51 Enable ccache for the recipe
52 """ 52 """
53 pn = d.getVar('PN') 53 pn = d.getVar('PN')
54 if ("ccache" in d.getVar("HOSTTOOLS").split() or 54 if (not bb.utils.to_boolean(d.getVar('CCACHE_DISABLE')) and
55 ("ccache" in d.getVar("HOSTTOOLS").split() or
55 pn in d.getVar('CCACHE_NATIVE_RECIPES_ALLOWED') or 56 pn in d.getVar('CCACHE_NATIVE_RECIPES_ALLOWED') or
56 not (bb.data.inherits_class("native", d) or 57 not bb.data.inherits_class("native", d))):
57 bb.utils.to_boolean(d.getVar('CCACHE_DISABLE')))):
58 d.appendVar('DEPENDS', ' ccache-native') 58 d.appendVar('DEPENDS', ' ccache-native')
59 d.setVar('CCACHE', 'ccache ') 59 d.setVar('CCACHE', 'ccache ')
60} 60}