Fix Android build (#886)

This commit is contained in:
Nikolay Igotti
2017-09-26 15:10:25 +03:00
committed by GitHub
parent fc31e96b26
commit eb0415b2e5
3 changed files with 6 additions and 2 deletions
@@ -78,11 +78,13 @@ internal open class AndroidPlatform(distribution: Distribution)
= binaries.filter { it.isUnixStaticLib }
override fun linkCommand(objectFiles: List<ObjectFile>, executable: ExecutableFile, optimize: Boolean, debug: Boolean): List<String> {
// liblog.so must be linked in, as we use its functionality in runtime.
return mutableListOf(clang).apply{
add("-o")
add(executable)
add("-fPIC")
add("-shared")
add("-llog")
addAll(objectFiles)
if (optimize) addAll(linkerOptimizationFlags)
if (!debug) addAll(linkerDebugFlags)