Skip to content

Commit 3e3bc32

Browse files
committed
toolchain: try using ccache if available
1 parent 9f8fe9c commit 3e3bc32

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pythonforandroid/toolchain.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,10 @@ def get_env(self):
374374
toolchain_prefix=toolchain_prefix,
375375
cxxflags=env['CXXFLAGS'])
376376

377+
if self.ctx.ccache:
378+
env["CC"] = "{} {}".format(self.ctx.ccache, env["CC"])
379+
env["CXX"] = "{} {}".format(self.ctx.ccache, env["CXX"])
380+
377381
env['AR'] = '{}-ar'.format(toolchain_prefix)
378382
env['RANLIB'] = '{}-ranlib'.format(toolchain_prefix)
379383
env['LD'] = '{}-ld'.format(toolchain_prefix)

0 commit comments

Comments
 (0)