Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Ignored caches for optimized compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
homuroll committed Jun 19, 2020
1 parent ba6326a commit e906d29
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

package org.jetbrains.kotlin.backend.konan

import org.jetbrains.kotlin.cli.common.messages.CompilerMessageSeverity
import org.jetbrains.kotlin.config.CompilerConfiguration
import org.jetbrains.kotlin.konan.file.File
import org.jetbrains.kotlin.konan.target.CompilerOutputKind
Expand Down Expand Up @@ -49,11 +50,15 @@ class CacheSupport(
library to cachePath
}

val optimized = configuration.getBoolean(KonanConfigKeys.OPTIMIZATION)
if (optimized && (explicitCacheFiles.isNotEmpty() || implicitCacheDirectories.isNotEmpty()))
configuration.report(CompilerMessageSeverity.WARNING, "Cached libraries will not be used for optimized compilation")

CachedLibraries(
target = target,
allLibraries = allLibraries,
explicitCaches = explicitCaches,
implicitCacheDirectories = implicitCacheDirectories
explicitCaches = if (optimized) emptyMap() else explicitCaches,
implicitCacheDirectories = if (optimized) emptyList() else implicitCacheDirectories
)
}

Expand Down

0 comments on commit e906d29

Please sign in to comment.