From: Jo-Philipp Wich Date: Mon, 23 Jan 2017 13:24:58 +0000 (+0100) Subject: phase1: set CCACHE_BASEDIR X-Git-Tag: v1~191 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=6dba2ab77da516c740e5d2e4828ff8bc02472656;p=buildbot.git phase1: set CCACHE_BASEDIR Add CCACHE_BASEDIR to default environment in order to improve cache hit rate for the global shared cache. Signed-off-by: Jo-Philipp Wich --- diff --git a/phase1/master.cfg b/phase1/master.cfg index 695973f..632294f 100644 --- a/phase1/master.cfg +++ b/phase1/master.cfg @@ -238,10 +238,19 @@ def GetCXX(props): else: return "g++" +def GetCwd(props): + if props.hasProperty("builddir"): + return props["builddir"] + elif props.hasProperty("workdir"): + return props["workdir"] + else: + return "/" + def MakeEnv(overrides=None): env = { 'CC': WithProperties("%(cc)s", cc=GetCC), - 'CXX': WithProperties("%(cxx)s", cxx=GetCXX) + 'CXX': WithProperties("%(cxx)s", cxx=GetCXX), + 'CCACHE_BASEDIR': WithProperties("%(cwd)s", cwd=GetCwd) } if overrides is not None: env.update(overrides)