Skip to content

Commit 3765c34

Browse files
committed
fix stripping that wasn't working for compiled cpp components
1 parent d1a0014 commit 3765c34

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

pythonforandroid/recipe.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -863,8 +863,20 @@ def build_compiled_components(self, arch):
863863
shprint(hostpython, 'setup.py', self.build_cmd, '-v',
864864
_env=env, *self.setup_extra_args)
865865
build_dir = glob.glob('build/lib.*')[0]
866-
shprint(sh.find, build_dir, '-name', '"*.o"', '-exec',
866+
shprint(sh.find, build_dir, '-name', '".o', '-exec',
867867
env['STRIP'], '{}', ';', _env=env)
868+
info('Stripping object files')
869+
shprint(sh.find, '.', '-iname', '*.o', '-exec',
870+
'/usr/bin/echo', '{}', ';', _env=env)
871+
shprint(sh.find, '.', '-iname', '*.o', '-exec',
872+
env['STRIP'].split(' ')[0], '--strip-unneeded',
873+
'{}', ';', _env=env)
874+
shprint(sh.find, '.', '-iname', '*.so', '-exec',
875+
'/usr/bin/echo', '{}', ';', _env=env)
876+
shprint(sh.find, '.', '-iname', '*.so', '-exec',
877+
env['STRIP'].split(' ')[0], '--strip-unneeded',
878+
'{}', ';', _env=env)
879+
868880

869881
def install_hostpython_package(self, arch):
870882
env = self.get_hostrecipe_env(arch)

0 commit comments

Comments
 (0)