[K/N][build] Split stdlib and endorsed libraries build and caching

Due to the usage of dist as an input and output at the same time by
different tasks Gradle issued warning about Execution optimizations
turning off. The fix is to split inputs and outputs in the build and
cache tasks of stdlib and endorsed libs.
This commit is contained in:
Pavel Punegov
2021-10-11 19:04:27 +03:00
committed by Space
parent ae2d447ef4
commit 634812f96f
6 changed files with 131 additions and 51 deletions
+3 -2
View File
@@ -58,8 +58,9 @@ rootProject.project("kotlin-native").ext.platformManager.enabled.each { target -
if (target in cacheableTargets) {
tasks.register("${targetName}StdlibCache", KonanCacheTask) {
it.target = targetName
it.originalKlib = file("$konanHome/klib/common/stdlib")
it.cacheRoot = file("$konanHome/klib/cache")
def runtimeBuild = project(":kotlin-native:runtime").buildDir
it.originalKlib = project.file("$runtimeBuild/${target}Stdlib")
it.cacheRoot = project.file("$runtimeBuild/cache/$target").path
it.dependsOn ":kotlin-native:${targetName}CrossDistRuntime"
}