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)