MCPcopy Create free account
hub / github.com/kivy/python-for-android / build_arch

Method build_arch

pythonforandroid/recipes/jpeg/__init__.py:21–55  ·  view source on GitHub ↗
(self, arch)

Source from the content-addressed store, hash-verified

19 # patches = ['remove-version.patch']
20
21 def build_arch(self, arch):
22 build_dir = self.get_build_dir(arch.arch)
23
24 # TODO: Fix simd/neon
25 with current_directory(build_dir):
26 env = self.get_recipe_env(arch)
27 toolchain_file = join(self.ctx.ndk_dir,
28 'build/cmake/android.toolchain.cmake')
29
30 shprint(sh.rm, '-rf', 'CMakeCache.txt', 'CMakeFiles/')
31 shprint(sh.cmake, '-G', 'Unix Makefiles',
32 '-DCMAKE_SYSTEM_NAME=Android',
33 '-DCMAKE_POSITION_INDEPENDENT_CODE=1',
34 '-DCMAKE_ANDROID_ARCH_ABI={arch}'.format(arch=arch.arch),
35 '-DCMAKE_ANDROID_NDK=' + self.ctx.ndk_dir,
36 '-DCMAKE_C_COMPILER={cc}'.format(cc=arch.get_clang_exe()),
37 '-DCMAKE_CXX_COMPILER={cc_plus}'.format(
38 cc_plus=arch.get_clang_exe(plus_plus=True)),
39 '-DCMAKE_BUILD_TYPE=Release',
40 '-DCMAKE_INSTALL_PREFIX=./install',
41 '-DCMAKE_TOOLCHAIN_FILE=' + toolchain_file,
42
43 '-DANDROID_ABI={arch}'.format(arch=arch.arch),
44 '-DANDROID_ARM_NEON=ON',
45 '-DENABLE_NEON=ON',
46 # '-DREQUIRE_SIMD=1',
47
48 # Force disable shared, with the static ones is enough
49 '-DENABLE_SHARED=0',
50 '-DENABLE_STATIC=1',
51
52 # Fix cmake compatibility issue
53 '-DCMAKE_POLICY_VERSION_MINIMUM=3.5',
54 _env=env)
55 shprint(sh.make, _env=env)
56
57
58recipe = JpegRecipe()

Callers

nothing calls this directly

Calls 6

current_directoryFunction · 0.90
shprintFunction · 0.90
formatMethod · 0.80
get_clang_exeMethod · 0.80
get_build_dirMethod · 0.45
get_recipe_envMethod · 0.45

Tested by

no test coverage detected