Fixed konan.data.dir with caches
Removed TODOs after updating to kotlin bootstrap version with konan.data.dir gradle property changes Fixed warning of incorrect passing -Xkonan-data-dir arg in konanc from KGP and fixed setting konan-data-dir in SetupConfiguration#setupCommonOptionsForCaches #KT-60660 Fixed Merge-request: KT-MR-11299 Merged-by: Dmitrii Krasnov <Dmitrii.Krasnov@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
e8905ea849
commit
ade88e2b0f
+1
@@ -324,6 +324,7 @@ internal fun CompilerConfiguration.setupCommonOptionsForCaches(konanConfig: Kona
|
||||
put(BinaryOptions.runtimeAssertionsMode, konanConfig.runtimeAssertsMode)
|
||||
put(LAZY_IR_FOR_CACHES, konanConfig.lazyIrForCaches)
|
||||
put(CommonConfigurationKeys.PARALLEL_BACKEND_THREADS, konanConfig.threadsCount)
|
||||
putIfNotNull(KONAN_DATA_DIR, konanConfig.distribution.localKonanDir.absolutePath)
|
||||
}
|
||||
|
||||
private fun Array<String>?.toNonNullList() = this?.asList().orEmpty()
|
||||
|
||||
@@ -54,14 +54,10 @@ apply plugin: "kotlin.native.build-tools-conventions"
|
||||
|
||||
ext {
|
||||
distDir = UtilsKt.getKotlinNativeDist(project)
|
||||
// TODO(Dmitrii Krasnov): remove else branch after KT-50463 will be in current bootstrap
|
||||
def konanDataDir = project.findProperty('konan.data.dir')
|
||||
dependenciesDir = konanDataDir != null ?
|
||||
DependencyDirectories.INSTANCE.getDependenciesRoot(konanDataDir.toString())
|
||||
: DependencyDirectories.defaultDependenciesRoot
|
||||
def konanDataDir = project.hasProperty('konan.data.dir') ? project.property('konan.data.dir').toString() : null
|
||||
dependenciesDir = DependencyDirectories.INSTANCE.getDependenciesRoot(konanDataDir)
|
||||
experimentalEnabled = project.hasProperty("org.jetbrains.kotlin.native.experimentalTargets")
|
||||
// TODO(Dmitrii Krasnov): add konanDataDir to the buildDistribution after KT-50463 will be in current bootstrap
|
||||
platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath),
|
||||
platformManager = new PlatformManager(DistributionKt.buildDistribution(projectDir.absolutePath, konanDataDir),
|
||||
ext.experimentalEnabled)
|
||||
|
||||
cacheableTargetNames = platformManager.hostPlatform.cacheableTargets
|
||||
|
||||
@@ -120,7 +120,6 @@ object KlibToolLogger : Logger, IrMessageLogger {
|
||||
}
|
||||
}
|
||||
|
||||
// TODO(Dmitrii Krasnov): I'm not sure that we should put konan distribution dir here
|
||||
val defaultRepository = File(DependencyDirectories.localKonanDir.resolve("klib").absolutePath)
|
||||
|
||||
open class ModuleDeserializer(val library: ByteArray) {
|
||||
|
||||
@@ -43,8 +43,8 @@ project.logger.info("kotlin_root: $kotlin_root")
|
||||
globalProperties.load(new java.io.FileReader(project.file("$kotlin_root/gradle.properties")))
|
||||
ext.kotlinNativeVersionInResources = true
|
||||
|
||||
// TODO(Dmitrii Krasnov): add konanDataDir to the buildDistribution after KT-50463 will be in current bootstrap
|
||||
def platformManager = new PlatformManager(DistributionKt.buildDistribution(UtilsKt.getKotlinNativeDist(project).path), false)
|
||||
def konanDataDir = project.hasProperty('konan.data.dir') ? project.property('konan.data.dir').toString() : null
|
||||
def platformManager = new PlatformManager(DistributionKt.buildDistribution(UtilsKt.getKotlinNativeDist(project).path, konanDataDir), false)
|
||||
def kotlinDist = null
|
||||
if (hasProperty("kotlin_dist")) {
|
||||
kotlinDist = file(findProperty("kotlin_dist"))
|
||||
|
||||
@@ -12,8 +12,8 @@ plugins {
|
||||
val toolsPath = "../../tools"
|
||||
val targetExtension = "Macos"
|
||||
|
||||
// TODO: add konanDataDir to the buildDistribution after KT-50463 will be in current bootstrap
|
||||
project.extra["platformManager"] = PlatformManager(buildDistribution(projectDir.parentFile.parentFile.absolutePath), false)
|
||||
val konanDataDir = if (project.hasProperty("konan.data.dir")) project.property("konan.data.dir").toString() else null
|
||||
project.extra["platformManager"] = PlatformManager(buildDistribution(projectDir.parentFile.parentFile.absolutePath, konanDataDir), false)
|
||||
swiftBenchmark {
|
||||
applicationName = "swiftInterop"
|
||||
commonSrcDirs = listOf("$toolsPath/benchmarks/shared/src/main/kotlin/report", "src", "../shared/src/main/kotlin")
|
||||
|
||||
Reference in New Issue
Block a user