[K/N][performance] Removed analyzer dependencies and fixed running benchmarks

This commit is contained in:
Elena Lepilkina
2021-03-18 08:50:19 +03:00
committed by Space
parent 30a024d05d
commit d709df9d8d
3 changed files with 9 additions and 20 deletions
@@ -60,7 +60,7 @@ open class RunKotlinNativeTask @Inject constructor(private val linkTask: Task,
project.exec {
if (useCset) {
executable = "cset"
args("shield", "--exec", "--", executable)
args("shield", "--exec", "--", this@RunKotlinNativeTask.executable)
} else {
executable = this@RunKotlinNativeTask.executable
}
-12
View File
@@ -107,7 +107,6 @@ task buildAnalyzer {
}
task konanRun {
dependsOn buildAnalyzer
subprojects.each {
dependsOn "${it.path}:konanRun"
}
@@ -119,7 +118,6 @@ task jvmRun {
throw new StopExecutionException("Please specify location of kotlin's dist in 'kotlin_dist' property")
}
}
dependsOn buildAnalyzer
subprojects.each {
if (it.name != "endorsedLibraries" && it.name != "kotlinx.cli") {
dependsOn "${it.path}:jvmRun"
@@ -344,60 +342,50 @@ task teamCityStat(type:Exec) {
task cinterop {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'cinterop:konanRun'
}
task framework {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'framework:konanRun'
}
task helloworld {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'helloworld:konanRun'
}
task objcinterop {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'objcinterop:konanRun'
}
task ring {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'ring:konanRun'
}
task numerical {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'numerical:konanRun'
}
task startup {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'startup:konanRun'
}
task swiftinterop {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'swiftinterop:konanRun'
}
task videoplayer {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'videoplayer:konanRun'
}
task KotlinVsSwift {
dependsOn 'clean'
dependsOn buildAnalyzer
dependsOn 'KotlinVsSwift:konanRun'
}
@@ -15,6 +15,7 @@ plugins {
val dist = file(findProperty("kotlin.native.home") ?: "dist")
val toolSuffix = if (System.getProperty("os.name").startsWith("Windows")) ".bat" else ""
val binarySuffix = getNativeProgramExtension()
val videoplayerDir = "$projectDir/../../samples/videoplayer"
val linkerOpts = when {
PlatformInfo.isMac() -> listOf("-linker-options","-L/opt/local/lib", "-linker-options", "-L/usr/local/lib")
@@ -59,15 +60,15 @@ compileBenchmark {
step("runCinteropFfmpeg") {
command = listOf(
"$dist/bin/cinterop$toolSuffix",
"-o", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib",
"-def", "$dist/../samples/videoplayer/src/nativeInterop/cinterop/ffmpeg.def"
"-o", "$videoplayerDir/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib",
"-def", "$videoplayerDir/src/nativeInterop/cinterop/ffmpeg.def"
) + filterDirsFfmpeg + includeDirsFfmpeg
}
step("runCinteropSdl") {
command = listOf(
"$dist/bin/cinterop$toolSuffix",
"-o", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib",
"-def", "$dist/../samples/videoplayer/src/nativeInterop/cinterop/sdl.def"
"-o", "$videoplayerDir/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib",
"-def", "$videoplayerDir/src/nativeInterop/cinterop/sdl.def"
) + includeDirsSdl
}
step("runKonanProgram") {
@@ -75,9 +76,9 @@ compileBenchmark {
"$dist/bin/konanc$toolSuffix",
"-ea", "-p", "program",
"-o", "${buildDir.absolutePath}/program$binarySuffix",
"-l", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib",
"-l", "$dist/../samples/videoplayer/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib",
"-Xmulti-platform", "$dist/../samples/videoplayer/src/videoPlayerMain/kotlin",
"-l", "$videoplayerDir/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-ffmpeg.klib",
"-l", "$videoplayerDir/build/classes/kotlin/videoPlayer/main/videoplayer-cinterop-sdl.klib",
"-Xmulti-platform", "$videoplayerDir/src/videoPlayerMain/kotlin",
"-entry", "sample.videoplayer.main"
) + buildOpts + linkerOpts
}