return requests[0]
def MakeEnv(overrides=None, tryccache=False):
- if tryccache:
- envcc = Interpolate("%(kw:cwd)s/ccache_cc.sh", cwd=GetCwd)
- envcxx = Interpolate("%(kw:cwd)s/ccache_cxx.sh", cwd=GetCwd)
- envccache = Interpolate("%(kw:ccache)s", ccache=GetCCache)
- envccc = Interpolate("%(kw:cc)s", cc=GetCC)
- envccxx = Interpolate("%(kw:cxx)s", cxx=GetCXX)
- else:
- envcc = Interpolate("%(kw:cc)s", cc=GetCC)
- envcxx = Interpolate("%(kw:cxx)s", cxx=GetCXX)
- envccache = ""
- envccc = ""
- envccxx = ""
env = {
- 'CC': envcc,
- 'CXX': envcxx,
- 'CCACHE': envccache,
- 'CCC': envccc,
- 'CCXX': envccxx,
+ 'CCC': Interpolate("%(kw:cc)s", cc=GetCC),
+ 'CCXX': Interpolate("%(kw:cxx)s", cxx=GetCXX),
}
+ if tryccache:
+ env['CC'] = Interpolate("%(kw:cwd)s/ccache_cc.sh", cwd=GetCwd)
+ env['CXX'] = Interpolate("%(kw:cwd)s/ccache_cxx.sh", cwd=GetCwd)
+ env['CCACHE'] = Interpolate("%(kw:ccache)s", ccache=GetCCache)
+ else:
+ env['CC'] = env['CCC']
+ env['CXX'] = env['CCXX']
+ env['CCACHE'] = ''
if overrides is not None:
env.update(overrides)
return env