phase1: remove GetCCache()
authorThibaut VARÈNE <hacks@slashdirt.org>
Thu, 20 Oct 2022 11:18:25 +0000 (13:18 +0200)
committerPetr Štetiar <ynezz@true.cz>
Mon, 15 May 2023 15:36:01 +0000 (17:36 +0200)
ccache_command is set from "which ccache" which is either empty or
contains "ccache". Use a simple interpolation instead.

Signed-off-by: Thibaut VARÈNE <hacks@slashdirt.org>
phase1/master.cfg

index 2f4337f72559e9e163f59eefd805a9fc50396d62..945533fe9d4883ee0a3701b49e10ad619edd9e44 100644 (file)
@@ -430,13 +430,6 @@ def GetNumJobs(props):
        else:
                return "1"
 
-@properties.renderer
-def GetCCache(props):
-       if props.hasProperty("ccache_command") and "ccache" in props["ccache_command"]:
-               return props["ccache_command"]
-       else:
-               return ""
-
 def GetNextBuild(builder, requests):
        for r in requests:
                if r.properties and r.properties.hasProperty("tag"):
@@ -454,7 +447,7 @@ def MakeEnv(overrides=None, tryccache=False):
        if tryccache:
                env['CC'] = Interpolate("%(prop:builddir)s/ccache_cc.sh")
                env['CXX'] = Interpolate("%(prop:builddir)s/ccache_cxx.sh")
-               env['CCACHE'] = Interpolate("%(kw:ccache)s", ccache=GetCCache)
+               env['CCACHE'] = Interpolate("%(prop:ccache_command:-)s")
        else:
                env['CC'] = env['CCC']
                env['CXX'] = env['CCXX']