[Native] Enable real Android Native executables (#4624)
* Add AndroidProgramType binary option, override entry point, fix linker flags * Add Konan_main_standalone entry point to the Android runtime * Add compiler warning * Make standalone programs print to stdout * Fix warning message and readability
This commit is contained in:
@@ -145,8 +145,11 @@ class AndroidLinker(targetProperties: AndroidConfigurables)
|
||||
return listOf(Command(clang).apply {
|
||||
+"-o"
|
||||
+executable
|
||||
+"-fPIC"
|
||||
+"-shared"
|
||||
when (kind) {
|
||||
LinkerOutputKind.EXECUTABLE -> +listOf("-fPIE", "-pie")
|
||||
LinkerOutputKind.DYNAMIC_LIBRARY -> +listOf("-fPIC", "-shared")
|
||||
LinkerOutputKind.STATIC_LIBRARY -> {}
|
||||
}
|
||||
+"-target"
|
||||
+clangTarget
|
||||
+libDirs
|
||||
|
||||
Reference in New Issue
Block a user