[K/N] Update list of targets with stable caches

Enable compiler caches for iosSimulatorArm64 and macosArm64 targets
to make Apple Silicon distribution feature complete with
Intel-based one.
This commit is contained in:
Sergey Bogolepov
2021-06-30 14:34:41 +07:00
committed by teamcityserver
parent 65fd8fc174
commit e396da0562
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -91,6 +91,7 @@ cacheableTargets.macos_arm64 = \
# Targets that support compiler caches, but these caches
# are not considered stable enough to be turned on by default.
# TODO: Not used by Gradle plugin yet. Tracking issue: https://youtrack.jetbrains.com/issue/KT-47529
optInCacheableTargets = \
ios_arm64 \
linux_x64
@@ -879,9 +879,12 @@ internal class CacheBuilder(val project: Project, val binary: NativeBinary, val
.map { KonanTarget.predefinedTargets.getValue(it) }
// Targets with well-tested static caches that can be enabled by default.
// TODO: Move it to konan.properties.
// TODO: There is a corresponding property in konan.properties (optInCacheableTargets),
// but naïve implementation makes build slower because it makes reading of konan.properties significantly more frequent.
// One possible solution is to use [Gradle Build service](https://docs.gradle.org/current/userguide/build_services.html).
// Tracking issue: https://youtrack.jetbrains.com/issue/KT-47529
private val targetsWithStableStaticCaches =
setOf(KonanTarget.IOS_X64, KonanTarget.MACOS_X64)
setOf(KonanTarget.IOS_X64, KonanTarget.MACOS_X64, KonanTarget.IOS_SIMULATOR_ARM64, KonanTarget.MACOS_ARM64)
internal fun cacheWorksFor(target: KonanTarget, project: Project) =
target in getCacheableTargets(project)