MCPcopy Index your code
hub / github.com/kivy/python-for-android / AndroidNDK

Class AndroidNDK

pythonforandroid/androidndk.py:5–87  ·  view source on GitHub ↗

This class is used to get the current NDK information.

Source from the content-addressed store, hash-verified

3
4
5class AndroidNDK:
6 """
7 This class is used to get the current NDK information.
8 """
9
10 ndk_dir = ""
11
12 def __init__(self, ndk_dir):
13 self.ndk_dir = ndk_dir
14
15 @property
16 def host_tag(self):
17 """
18 Returns the host tag for the current system.
19 Note: The host tag is ``darwin-x86_64`` even on Apple Silicon macs.
20 """
21 return f"{sys.platform}-x86_64"
22
23 @property
24 def llvm_prebuilt_dir(self):
25 return os.path.join(
26 self.ndk_dir, "toolchains", "llvm", "prebuilt", self.host_tag
27 )
28
29 @property
30 def llvm_bin_dir(self):
31 return os.path.join(self.llvm_prebuilt_dir, "bin")
32
33 @property
34 def clang(self):
35 return os.path.join(self.llvm_bin_dir, "clang")
36
37 @property
38 def clang_cxx(self):
39 return os.path.join(self.llvm_bin_dir, "clang++")
40
41 @property
42 def llvm_binutils_prefix(self):
43 return os.path.join(self.llvm_bin_dir, "llvm-")
44
45 @property
46 def llvm_ar(self):
47 return f"{self.llvm_binutils_prefix}ar"
48
49 @property
50 def llvm_ranlib(self):
51 return f"{self.llvm_binutils_prefix}ranlib"
52
53 @property
54 def llvm_objcopy(self):
55 return f"{self.llvm_binutils_prefix}objcopy"
56
57 @property
58 def llvm_objdump(self):
59 return f"{self.llvm_binutils_prefix}objdump"
60
61 @property
62 def llvm_readelf(self):

Callers 5

setUpMethod · 0.90
setUpMethod · 0.90
setUpMethod · 0.90
setUpMethod · 0.90

Calls

no outgoing calls

Tested by 3

setUpMethod · 0.72
setUpMethod · 0.72
setUpMethod · 0.72