@@ -20,15 +20,15 @@ def prebuild_arch(self, arch):
20
20
super (BoostRecipe , self ).prebuild_arch (arch )
21
21
env = self .get_recipe_env (arch )
22
22
with current_directory (self .get_build_dir (arch .arch )):
23
- # Make custom toolchain
24
- bash = sh . Command ( 'bash' )
25
- shprint ( bash , join ( self . ctx . ndk_dir , 'build/tools/make-standalone-toolchain.sh' ),
26
- '--ndk-dir=' + self .ctx .ndk_dir ,
27
- '--arch=' + env ['ARCH' ],
28
- '--platform=android-' + str (self .ctx .android_api ),
29
- '--toolchain=' + env ['CROSSHOST' ] + '-' + env ['TOOLCHAIN_VERSION' ],
30
- '--install-dir=' + env ['CROSSHOME' ]
31
- )
23
+ if not exists ( env [ 'CROSSHOME' ]):
24
+ # Make custom toolchain
25
+ bash = sh . Command ( 'bash' )
26
+ shprint ( bash , join ( self .ctx .ndk_dir , 'build/tools/make-standalone-toolchain.sh' ) ,
27
+ '--arch=' + env ['ARCH' ],
28
+ '--platform=android-' + str (self .ctx .android_api ),
29
+ '--toolchain=' + env ['CROSSHOST' ] + '-' + env ['TOOLCHAIN_VERSION' ],
30
+ '--install-dir=' + env ['CROSSHOME' ]
31
+ )
32
32
# Set custom configuration
33
33
shutil .copyfile (join (self .get_recipe_dir (), 'user-config.jam' ),
34
34
join (env ['BOOST_BUILD_PATH' ], 'user-config.jam' ))
0 commit comments