@@ -20,15 +20,15 @@ def prebuild_arch(self, arch):
2020 super (BoostRecipe , self ).prebuild_arch (arch )
2121 env = self .get_recipe_env (arch )
2222 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+ )
3232 # Set custom configuration
3333 shutil .copyfile (join (self .get_recipe_dir (), 'user-config.jam' ),
3434 join (env ['BOOST_BUILD_PATH' ], 'user-config.jam' ))
0 commit comments