From 82d13239cbee5b9d871a49fd0cdaa1ed7bd11140 Mon Sep 17 00:00:00 2001 From: Elena Lepilkina Date: Fri, 17 May 2019 17:36:44 +0300 Subject: [PATCH] Fix benchmarks after migrating to new MPP plugin syntax --- performance/buildSrc/src/main/kotlin/MPPTools.kt | 2 +- performance/gradle/benchmark.gradle | 9 ++++++++- tools/benchmarksAnalyzer/build.gradle | 2 +- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/performance/buildSrc/src/main/kotlin/MPPTools.kt b/performance/buildSrc/src/main/kotlin/MPPTools.kt index 198b0d3b65d..7e8971e3d73 100644 --- a/performance/buildSrc/src/main/kotlin/MPPTools.kt +++ b/performance/buildSrc/src/main/kotlin/MPPTools.kt @@ -174,7 +174,7 @@ fun getJvmCompileTime(programName: String): BenchmarkResult = @JvmOverloads fun getNativeCompileTime(programName: String, - tasks: List = listOf("compileKotlinNative", "linkMainReleaseExecutableNative")): BenchmarkResult = + tasks: List = listOf("compileKotlinNative", "linkBenchmarkReleaseExecutableNative")): BenchmarkResult = TaskTimerListener.getBenchmarkResult(programName, tasks) fun getCompileBenchmarkTime(programName: String, tasksNames: Iterable, repeats: Int, exitCodes: Map) = diff --git a/performance/gradle/benchmark.gradle b/performance/gradle/benchmark.gradle index 12dba28fcd1..d63fd9676a3 100644 --- a/performance/gradle/benchmark.gradle +++ b/performance/gradle/benchmark.gradle @@ -19,6 +19,13 @@ private def determinePreset() { preset } +def getMingwPath() { + def directory = System.getenv("MINGW64_DIR") + if (directory == null) + directory = "c:/msys64/mingw64" + return directory +} + def hostPreset = determinePreset() kotlin { @@ -62,7 +69,7 @@ kotlin { binaries { executable('benchmark', [RELEASE]) { if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { - linkerOpts("-L${getMingwPath()}/lib") + linkerOpts = ["-L${getMingwPath()}/lib".toString()] } } } diff --git a/tools/benchmarksAnalyzer/build.gradle b/tools/benchmarksAnalyzer/build.gradle index 42364ab006c..2f1c796a3f0 100644 --- a/tools/benchmarksAnalyzer/build.gradle +++ b/tools/benchmarksAnalyzer/build.gradle @@ -102,7 +102,7 @@ kotlin { fromPreset(presets.mingwX64, 'windows') { binaries.all { - linkerOpts = ["-L${getMingwPath()}/lib"] + linkerOpts = ["-L${getMingwPath()}/lib".toString()] } compilations.main.cinterops { libcurl {