Skip to content

Commit b1aa582

Browse files
homurollSpace Team
authored and
Space Team
committed
[K/N] Do not check caches consistency until all of them are built
#KT-60371 Fixed
1 parent 0f6d84c commit b1aa582

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/CacheSupport.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class PartialCacheInfo(val klib: KotlinLibrary, val strategy: CacheDeserializati
8080

8181
class CacheSupport(
8282
private val configuration: CompilerConfiguration,
83-
resolvedLibraries: KotlinLibraryResolveResult,
83+
private val resolvedLibraries: KotlinLibraryResolveResult,
8484
ignoreCacheReason: String?,
8585
systemCacheDirectory: File,
8686
autoCacheDirectory: File,
@@ -181,7 +181,7 @@ class CacheSupport(
181181
fun cacheFileId(fqName: String, filePath: String) = "${if (fqName == "") "ROOT" else fqName}.${filePath.hashCode().toString(Character.MAX_RADIX)}"
182182
}
183183

184-
init {
184+
fun checkConsistency() {
185185
// Ensure dependencies of every cached library are cached too:
186186
resolvedLibraries.getFullList { libraries ->
187187
libraries.map { library ->

kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/KonanDriver.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ class KonanDriver(
7575
konanConfig = KonanConfig(project, configuration) // TODO: Just set freshly built caches.
7676
}
7777

78+
konanConfig.cacheSupport.checkConsistency()
79+
7880
DynamicCompilerDriver().run(konanConfig, environment)
7981
}
8082

0 commit comments

Comments
 (0)