[performance] enable "swift run"
This commit is contained in:
@@ -47,6 +47,18 @@ task mergeJvmReports {
|
||||
}
|
||||
}
|
||||
|
||||
task jvmJsonReport {
|
||||
subprojects.each {
|
||||
dependsOn(it.getTasksByName('jvmJsonReport', true)[0])
|
||||
}
|
||||
}
|
||||
|
||||
task konanJsonReport {
|
||||
subprojects.each {
|
||||
dependsOn(it.getTasksByName('konanJsonReport', true)[0])
|
||||
}
|
||||
}
|
||||
|
||||
subprojects.each {
|
||||
it.getTasksByName('jvmJsonReport', true)[0].finalizedBy mergeJvmReports
|
||||
it.getTasksByName('konanJsonReport', true)[0].finalizedBy mergeNativeReports
|
||||
|
||||
@@ -13,9 +13,18 @@ val toolsPath = "../../../tools"
|
||||
|
||||
swiftBenchmark {
|
||||
applicationName = "Ring"
|
||||
commonSrcDirs = listOf("$toolsPath/benchmarks/shared/src/main/kotlin", "../../shared/src/main/kotlin")
|
||||
nativeSrcDirs = listOf("../../shared/src/main/kotlin-native/common", "../../shared/src/main/kotlin-native/posix")
|
||||
commonSrcDirs = listOf("$toolsPath/benchmarks/shared/src/main/kotlin",
|
||||
"../../shared/src/main/kotlin")
|
||||
nativeSrcDirs = listOf("$toolsPath/benchmarksAnalyzer/src/main/kotlin-native",
|
||||
"../../shared/src/main/kotlin-native/common",
|
||||
"../../shared/src/main/kotlin-native/posix")
|
||||
swiftSources = File("$projectDir/src").list().map { "$projectDir/src/$it" }.toList()
|
||||
compileTasks = listOf("buildSwift")
|
||||
useCodeSize = CodeSizeEntity.EXECUTABLE
|
||||
}
|
||||
|
||||
tasks.named<org.jetbrains.kotlin.gradle.tasks.KotlinNativeCompile>("compileKotlinNative") {
|
||||
dependsOn(gradle.includedBuild("benchmarksAnalyzer").task(":cinteropLibcurlMacos"))
|
||||
kotlinOptions.freeCompilerArgs = listOf("-repo", project.file("$toolsPath/benchmarksAnalyzer/build/classes/kotlin/macos/main").absolutePath,
|
||||
"-l", "benchmarksAnalyzer-cinterop-libcurl")
|
||||
}
|
||||
@@ -4,6 +4,9 @@ import org.jetbrains.kotlin.BuildRegister
|
||||
import org.jetbrains.kotlin.MPPTools
|
||||
import org.jetbrains.kotlin.UtilsKt
|
||||
import org.jetbrains.kotlin.konan.CompilerVersionKt
|
||||
import org.jetbrains.kotlin.konan.target.DistributionKt
|
||||
import org.jetbrains.kotlin.konan.target.PlatformManager
|
||||
import org.jetbrains.kotlin.konan.util.DependencyProcessor
|
||||
|
||||
buildscript {
|
||||
ext.rootBuildDirectory = file('..')
|
||||
@@ -45,6 +48,8 @@ ext.kotlinNativeVersionInResources = true
|
||||
def versionString = VersionGeneratorKt.kotlinNativeVersionResourceFile(project).readLines().first()
|
||||
def kotlinNativeVersionObject = CompilerVersionKt.parseCompilerVersion(versionString)
|
||||
|
||||
def platformManager = new PlatformManager(DistributionKt.buildDistribution(UtilsKt.getKotlinNativeDist(project).path), false)
|
||||
|
||||
subprojects { proj ->
|
||||
globalProperties.each { k, v->
|
||||
def key = k as String
|
||||
@@ -53,9 +58,11 @@ subprojects { proj ->
|
||||
proj.ext.set(key, value)
|
||||
}
|
||||
MiscKt.kotlinInit(proj, findProperty("cacheRedirectorEnabled")?.toString()?.toBoolean() ?: false)
|
||||
proj.ext.platformManager = platformManager
|
||||
proj.ext["bootstrapKotlinRepo"] = BootstrapKt.getBootstrapKotlinRepo(proj)
|
||||
proj.ext["bootstrapKotlinVersion"] = BootstrapKt.getBootstrapKotlinVersion(proj)
|
||||
proj.ext["kotlin.native.home"] = proj.projectDir.relativePath(UtilsKt.getKotlinNativeDist(project))
|
||||
proj.ext["konan.home"] = proj.ext["kotlin.native.home"]
|
||||
proj.ext["konanVersion"] = kotlinNativeVersionObject.toString()
|
||||
proj.ext["kotlin.native.enabled"] = true
|
||||
proj.logger.info("${proj.name}<<<[kotlin.native.home] = ${proj.ext["kotlin.native.home"]}")
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
org.jetbrains.kotlin.native.home=../../dist
|
||||
kotlin.native.home=../../dist
|
||||
org.gradle.jvmargs=-Xmx2048m
|
||||
# Avoid building platform libraries by the MPP plugin.
|
||||
kotlin.native.distribution.type=prebuilt
|
||||
Reference in New Issue
Block a user