File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,13 @@ def get_env(self):
52
52
env ['TOOLCHAIN_PREFIX' ] = toolchain_prefix
53
53
env ['TOOLCHAIN_VERSION' ] = toolchain_version
54
54
55
+ ccache = ''
56
+ if self .ctx .ccache and bool (int (environ .get ('USE_CCACHE' , '1' ))):
57
+ print ('ccache found, will optimize builds' )
58
+ ccache = self .ctx .ccache + ' '
59
+ env ['USE_CCACHE' ] = '1'
60
+ env ['NDK_CCACHE' ] = self .ctx .ccache
61
+
55
62
print ('path is' , environ ['PATH' ])
56
63
cc = find_executable ('{command_prefix}-gcc' .format (
57
64
command_prefix = command_prefix ), path = environ ['PATH' ])
@@ -62,11 +69,13 @@ def get_env(self):
62
69
'installed. Exiting.' )
63
70
exit (1 )
64
71
65
- env ['CC' ] = '{command_prefix}-gcc {cflags}' .format (
72
+ env ['CC' ] = '{ccache}{ command_prefix}-gcc {cflags}' .format (
66
73
command_prefix = command_prefix ,
74
+ ccache = ccache ,
67
75
cflags = env ['CFLAGS' ])
68
- env ['CXX' ] = '{command_prefix}-g++ {cxxflags}' .format (
76
+ env ['CXX' ] = '{ccache}{ command_prefix}-g++ {cxxflags}' .format (
69
77
command_prefix = command_prefix ,
78
+ ccache = ccache ,
70
79
cxxflags = env ['CXXFLAGS' ])
71
80
72
81
env ['AR' ] = '{}-ar' .format (command_prefix )
You can’t perform that action at this time.
0 commit comments