Skip to content

Commit a8fb908

Browse files
committed
Support ccache
1 parent 3dddf20 commit a8fb908

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

refresh.template.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,6 +760,14 @@ def _all_platform_patch(compile_args: typing.List[str]):
760760
new_compile_args.append(arg)
761761
compile_args = new_compile_args
762762

763+
# replace ccache with the actual compiler
764+
compiler_path = os.readlink(compile_args[0])
765+
if compiler_path.endswith("ccache"):
766+
compiler = os.path.basename(compile_args[0])
767+
real_compiler_path = shutil.which(compiler)
768+
if real_compiler_path:
769+
compile_args[0] = real_compiler_path
770+
763771
# Any other general fixes would go here...
764772

765773
return compile_args

0 commit comments

Comments
 (0)