Support custom entry points for native binaries

This commit is contained in:
Ilya Matveev
2018-09-06 21:03:36 +07:00
committed by Ilya Matveev
parent 76074f9543
commit f5eecdd547
7 changed files with 16 additions and 0 deletions
@@ -319,6 +319,9 @@ class KotlinNativeCompilation(
}.toMutableList()
}
var entryPoint: String? = null
fun entryPoint(value: String) { entryPoint = value }
// Naming
override val compileDependencyConfigurationName: String
@@ -77,6 +77,9 @@ open class KotlinNativeCompile : AbstractCompile() {
val target: String
@Input get() = compilation.target.konanTarget.name
val entryPoint: String?
@Optional @Input get() = compilation.entryPoint
val additionalCompilerOptions: Collection<String>
@Input get() = compilation.extraOpts
@@ -174,6 +177,7 @@ open class KotlinNativeCompile : AbstractCompile() {
addArg("-target", target)
addArg("-p", outputKind.name.toLowerCase())
addArgIfNotNull("-entry", entryPoint)
add("-Xmulti-platform")