FreeRDP
Loading...
Searching...
No Matches
toolchains_path Namespace Reference

Functions

 get_host_tag_or_die ()
 
 get_toolchain_path_or_die (ndk, host_tag)
 
 main ()
 

Detailed Description

    Get the toolchains path
    https://proandroiddev.com/tutorial-compile-openssl-to-1-1-1-for-android-application-87137968fee

Function Documentation

◆ get_host_tag_or_die()

toolchains_path.get_host_tag_or_die ( )
Return the host tag for this platform. Die if not supported.

Definition at line 15 of file toolchains_path.py.

15def get_host_tag_or_die():
16 """Return the host tag for this platform. Die if not supported."""
17 if sys.platform.startswith('linux'):
18 return 'linux-x86_64'
19 elif sys.platform == 'darwin':
20 return 'darwin-x86_64'
21 elif sys.platform == 'win32' or sys.platform == 'cygwin':
22 host_tag = 'windows-x86_64'
23 if not os.path.exists(os.path.join(NDK_DIR, 'prebuilt', host_tag)):
24 host_tag = 'windows'
25 return host_tag
26 sys.exit('Unsupported platform: ' + sys.platform)
27
28

Referenced by main().

Here is the caller graph for this function:

◆ get_toolchain_path_or_die()

toolchains_path.get_toolchain_path_or_die (   ndk,
  host_tag 
)
Return the toolchain path or die.

Definition at line 29 of file toolchains_path.py.

29def get_toolchain_path_or_die(ndk, host_tag):
30 """Return the toolchain path or die."""
31 toolchain_path = os.path.join(ndk, 'toolchains/llvm/prebuilt',
32 host_tag, 'bin')
33 if not os.path.exists(toolchain_path):
34 sys.exit('Could not find toolchain: {}'.format(toolchain_path))
35 return toolchain_path
36

Referenced by main().

Here is the caller graph for this function:

◆ main()

toolchains_path.main ( )
Program entry point.

Definition at line 37 of file toolchains_path.py.

37def main():
38 """Program entry point."""
39 parser = argparse.ArgumentParser(description='Optional app description')
40 parser.add_argument('--ndk', required=True,
41 help='The NDK Home directory')
42 args = parser.parse_args()
43
44 host_tag = get_host_tag_or_die()
45 toolchain_path = get_toolchain_path_or_die(args.ndk, host_tag)
46 print(toolchain_path)
47

References get_host_tag_or_die(), get_toolchain_path_or_die(), and main().

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function: