how to support ccache in waf?
i want to use ccache (https://ccache.dev/) in waf. My OS is Win 10;
if I have lots of options , waf will use likes :
[ 1/1316] Compiling a.c
23:05:43 runner ['gcc.exe', '@C:\\Users\\XIA~1.CHE\\AppData\\Local\\Temp\\tmpf5p03l0u']
now I have a c.py
class c(Task.Task):
run_str='${ccache} ${CC} ${ARCH_ST:ARCH} ${CFLAGS} ${FRAMEWORKPATH_ST:FRAMEWORKPATH} ${CPPPATH_ST:INCPATHS} ${DEFINES_ST:DEFINES} ${CC_SRC_F} ${SRC} ${CC_TGT_F} ${TGT[0].abspath()} ${CPPFLAGS}'
vars=['CCDEPS']
ext_in=['.h']
scan=c_preproc.scan
then waf will convert command line likes :
[ 1/1316] Compiling a.c
23:05:43 runner ['ccache.exe', '@C:\\Users\\XIA~1.CHE\\AppData\\Local\\Temp\\tmpf5p03l0u']
then it lead error 。
is it possbile to convet command line as:
[ 1/1316] Compiling a.c
23:05:43 runner ['ccache.exe', 'gcc.exe','@C:\\Users\\XIA~1.CHE\\AppData\\Local\\Temp\\tmpf5p03l0u']
if I set `SET CC='ccache ccrh850.exe' then give some error likes :
[ 1/1316] Compiling ASW\TestCD\Tlib_Io\Tlib_SwsIo_L3.c
23:35:47 runner ["'ccache ccrh850.exe'", '@C:\\Users\\XIA~1.CHE\\AppData\\Local\\Temp\\tmpsu2ijlmb']
Waf: Leaving directory `D:\SW\ZCU\BSW_Z4R101A540_2\_build'
Build failed
Traceback (most recent call last):
File "C:\toolrepo\waf\waf3-2.0.23_u1.9.2\waflib\Task.py", line 213, in process
ret=self.run()
File "<string>", line 29, in f
File "C:\toolrepo\waf\waf3-2.0.23_u1.9.2\waflib\Task.py", line 170, in exec_command
return self.generator.bld.exec_command(cmd+['@'+tmp],**kw)
File "C:\toolrepo\waf\waf3-2.0.23_u1.9.2\waflib\Context.py", line 164, in exec_command
raise Errors.WafError('Program %s not found!'%cmd[0])
waflib.Errors.WafError: Program 'ccache ccrh850.exe' not found!
or
Checking for program 'ccache, ccv850' : 'ccache ccrh850.exe'
Program ["'ccache ccrh850.exe'"] is not executable
or can you kindly give some suggestion about how to support ccache?
thanks !
Edited by chen x319