Gradle, native: Fix generating platform libs for Windows
This commit is contained in:
+7
-7
@@ -81,8 +81,8 @@ internal abstract class KotlinNativeToolRunner(
|
|||||||
final override fun getCustomJvmArgs() = project.jvmArgs
|
final override fun getCustomJvmArgs() = project.jvmArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Kotlin/Native C-interop tool runner */
|
/** A common ancestor for all runners that run the cinterop tool. */
|
||||||
internal class KotlinNativeCInteropRunner(project: Project) : KotlinNativeToolRunner("cinterop", project) {
|
internal abstract class AbstractKotlinNativeCInteropRunner(toolName: String, project: Project) : KotlinNativeToolRunner(toolName, project) {
|
||||||
override val mustRunViaExec get() = true
|
override val mustRunViaExec get() = true
|
||||||
|
|
||||||
override val environment by lazy {
|
override val environment by lazy {
|
||||||
@@ -110,6 +110,9 @@ internal class KotlinNativeCInteropRunner(project: Project) : KotlinNativeToolRu
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** Kotlin/Native C-interop tool runner */
|
||||||
|
internal class KotlinNativeCInteropRunner(project: Project) : AbstractKotlinNativeCInteropRunner("cinterop", project)
|
||||||
|
|
||||||
/** Kotlin/Native compiler runner */
|
/** Kotlin/Native compiler runner */
|
||||||
internal class KotlinNativeCompilerRunner(project: Project) : KotlinNativeToolRunner("konanc", project) {
|
internal class KotlinNativeCompilerRunner(project: Project) : KotlinNativeToolRunner("konanc", project) {
|
||||||
private val useArgFile get() = project.disableKonanDaemon
|
private val useArgFile get() = project.disableKonanDaemon
|
||||||
@@ -138,13 +141,10 @@ internal class KotlinNativeKlibRunner(project: Project) : KotlinNativeToolRunner
|
|||||||
override val mustRunViaExec get() = project.disableKonanDaemon
|
override val mustRunViaExec get() = project.disableKonanDaemon
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Platform libraries generation tool. */
|
/** Platform libraries generation tool. Runs the cinterop tool under the hood. */
|
||||||
internal class KotlinNativeLibraryGenerationRunner(project: Project) :
|
internal class KotlinNativeLibraryGenerationRunner(project: Project) :
|
||||||
KotlinNativeToolRunner("generatePlatformLibraries", project)
|
AbstractKotlinNativeCInteropRunner("generatePlatformLibraries", project)
|
||||||
{
|
{
|
||||||
// Library generator starts the interop tool which cannot be executed in daemon.
|
|
||||||
override val mustRunViaExec: Boolean get() = true
|
|
||||||
|
|
||||||
// The library generator works for a long time so enabling C2 can improve performance.
|
// The library generator works for a long time so enabling C2 can improve performance.
|
||||||
override val disableC2: Boolean = false
|
override val disableC2: Boolean = false
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user