Build infra: Fix rebuilding caches after library changes

This commit is contained in:
Ilya Matveev
2020-08-12 15:31:57 +07:00
committed by Ilya Matveev
parent a9201210f6
commit 323ac4bf5b
@@ -49,6 +49,12 @@ open class KonanCacheTask: DefaultTask() {
@TaskAction
fun compile() {
// Compiler doesn't create a cache if the cacheFile already exists. So we need to remove it manually.
if (cacheFile.exists()) {
val deleted = cacheFile.deleteRecursively()
check(deleted) { "Cannot delete stale cache: ${cacheFile.absolutePath}" }
}
val args = listOf(
"-g",
"-target", target,