Skip to content

Commit 07d3429

Browse files
committed
[recipe-stl] Make CppCompiledComponentsPythonRecipe use Recipe's STL support
1 parent c9d2633 commit 07d3429

File tree

1 file changed

+1
-29
lines changed

1 file changed

+1
-29
lines changed

pythonforandroid/recipe.py

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,35 +1040,7 @@ def rebuild_compiled_components(self, arch, env):
10401040
class CppCompiledComponentsPythonRecipe(CompiledComponentsPythonRecipe):
10411041
""" Extensions that require the cxx-stl """
10421042
call_hostpython_via_targetpython = False
1043-
1044-
def get_recipe_env(self, arch):
1045-
env = super(CppCompiledComponentsPythonRecipe, self).get_recipe_env(arch)
1046-
keys = dict(
1047-
ctx=self.ctx,
1048-
arch=arch,
1049-
arch_noeabi=arch.arch.replace('eabi', '')
1050-
)
1051-
env['LDSHARED'] = env['CC'] + ' -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions'
1052-
env['CFLAGS'] += (
1053-
" -I{ctx.ndk_dir}/platforms/android-{ctx.android_api}/arch-{arch_noeabi}/usr/include" +
1054-
" -I{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/include" +
1055-
" -I{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/libs/{arch.arch}/include").format(**keys)
1056-
env['CXXFLAGS'] = env['CFLAGS'] + ' -frtti -fexceptions'
1057-
env['LDFLAGS'] += (
1058-
" -L{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/libs/{arch.arch}" +
1059-
" -lgnustl_shared").format(**keys)
1060-
1061-
return env
1062-
1063-
def build_compiled_components(self, arch):
1064-
super(CppCompiledComponentsPythonRecipe, self).build_compiled_components(arch)
1065-
1066-
# Copy libgnustl_shared.so
1067-
with current_directory(self.get_build_dir(arch.arch)):
1068-
sh.cp(
1069-
"{ctx.ndk_dir}/sources/cxx-stl/gnu-libstdc++/{ctx.toolchain_version}/libs/{arch.arch}/libgnustl_shared.so".format(ctx=self.ctx, arch=arch),
1070-
self.ctx.get_libs_dir(arch.arch)
1071-
)
1043+
need_stl_shared = True
10721044

10731045

10741046
class CythonRecipe(PythonRecipe):

0 commit comments

Comments
 (0)