diff --git a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt index 084e04a5300..fc401f3d3ad 100644 --- a/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt +++ b/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/ToplevelPhases.kt @@ -255,7 +255,6 @@ internal val dependenciesLowerPhase = SameTypeNamedPhaseWrapper( name = "LowerLibIR", description = "Lower library's IR", prerequisite = emptySet(), - dumperVerifier = EmptyDumperVerifier(), lower = object : CompilerPhase { override fun invoke(phaseConfig: PhaseConfig, phaserState: PhaserState, context: Context, input: IrModuleFragment): IrModuleFragment { val files = mutableListOf() diff --git a/gradle.properties b/gradle.properties index 8fe8a40658e..57cd1fa0c98 100644 --- a/gradle.properties +++ b/gradle.properties @@ -18,9 +18,9 @@ buildKotlinVersion=1.3.50-dev-44 buildKotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.3.50-dev-44,pinned:true/artifacts/content/maven remoteRoot=konan_tests -kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.3.50-dev-67,branch:default:true,pinned:true/artifacts/content/maven -kotlinVersion=1.3.50-dev-67 -testKotlinVersion=1.3.50-dev-67 +kotlinCompilerRepo=https://teamcity.jetbrains.com/guestAuth/app/rest/builds/buildType:(id:Kotlin_dev_Compiler),number:1.3.50-dev-259,branch:default:true,pinned:true/artifacts/content/maven +kotlinVersion=1.3.50-dev-259 +testKotlinVersion=1.3.50-dev-259 # See https://teamcity.jetbrains.com/project.html?projectId=Kotlin_KotlinNativeShared&tab=projectOverview sharedRepo=https://dl.bintray.com/jetbrains/kotlin-native-dependencies sharedVersion=1.0-dev-57 diff --git a/performance/buildSrc/src/main/kotlin/MPPTools.kt b/performance/buildSrc/src/main/kotlin/MPPTools.kt index 9eb8ab8037e..198b0d3b65d 100644 --- a/performance/buildSrc/src/main/kotlin/MPPTools.kt +++ b/performance/buildSrc/src/main/kotlin/MPPTools.kt @@ -10,8 +10,8 @@ import org.gradle.api.Project import org.gradle.api.Task import org.gradle.api.tasks.TaskState import org.gradle.api.execution.TaskExecutionListener -import org.jetbrains.kotlin.gradle.plugin.KotlinTarget import org.jetbrains.kotlin.gradle.plugin.KotlinTargetPreset +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import org.jetbrains.report.* import org.jetbrains.report.json.* import java.nio.file.Paths @@ -76,8 +76,8 @@ fun getNativeProgramExtension(): String = when { else -> error("Unknown host") } -fun getKotlinNativeExecutable(target: KotlinTarget, buildType: String) = - target.compilations.main.getBinary("EXECUTABLE", buildType).toString() +fun getKotlinNativeExecutable(target: KotlinNativeTarget, buildType: String) = + target.binaries.getExecutable("benchmark", buildType).outputFile.getAbsolutePath() fun getFileSize(filePath: String): Long? { val file = File(filePath) @@ -161,7 +161,7 @@ fun sendUploadRequest(url: String, fileName: String, username: String? = null, p fun createRunTask( subproject: Project, name: String, - target: KotlinTarget, + target: KotlinNativeTarget, configureClosure: Closure? = null ): Task { val task = subproject.tasks.create(name, RunKotlinNativeTask::class.java, target) diff --git a/performance/buildSrc/src/main/kotlin/RunKotlinNativeTask.kt b/performance/buildSrc/src/main/kotlin/RunKotlinNativeTask.kt index c9d719a33f5..dbbe194aca7 100644 --- a/performance/buildSrc/src/main/kotlin/RunKotlinNativeTask.kt +++ b/performance/buildSrc/src/main/kotlin/RunKotlinNativeTask.kt @@ -9,12 +9,12 @@ import org.gradle.api.Task import org.gradle.api.tasks.TaskAction import org.gradle.api.tasks.options.Option import org.gradle.api.tasks.Input -import org.jetbrains.kotlin.gradle.plugin.KotlinTarget +import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget import javax.inject.Inject import java.io.File open class RunKotlinNativeTask @Inject constructor( - private val curTarget: KotlinTarget + private val curTarget: KotlinNativeTarget ) : DefaultTask() { var buildType = "RELEASE" @@ -40,7 +40,7 @@ open class RunKotlinNativeTask @Inject constructor( override fun configure(configureClosure: Closure): Task { val task = super.configure(configureClosure) - this.dependsOn += curTarget.compilations.main.linkTaskName("EXECUTABLE", buildType) + this.dependsOn += curTarget.binaries.getExecutable("benchmark", buildType).linkTaskName return task } @@ -52,7 +52,7 @@ open class RunKotlinNativeTask @Inject constructor( val filterArgs = filter.splitCommaSeparatedOption("-f") val filterRegexArgs = filterRegex.splitCommaSeparatedOption("-fr") project.exec { - it.executable = curTarget.compilations.main.getBinary("EXECUTABLE", buildType).toString() + it.executable = curTarget.binaries.getExecutable("benchmark", buildType).outputFile.getAbsolutePath() it.args = curArgs + filterArgs + filterRegexArgs it.environment = curEnvironment it.workingDir(workingDir) diff --git a/performance/gradle/benchmark.gradle b/performance/gradle/benchmark.gradle index 4872321d1b4..12dba28fcd1 100644 --- a/performance/gradle/benchmark.gradle +++ b/performance/gradle/benchmark.gradle @@ -47,21 +47,24 @@ kotlin { } } - targets { - fromPreset(presets.jvm, 'jvm') { - compilations.all { - tasks[compileKotlinTaskName].kotlinOptions { - jvmTarget = '1.8' - suppressWarnings = true - freeCompilerArgs = (project.hasProperty('compilerArgs') ? compilerArgs.split() : []) - } + jvm() { + compilations.all { + tasks[compileKotlinTaskName].kotlinOptions { + jvmTarget = '1.8' + suppressWarnings = true + freeCompilerArgs = (project.hasProperty('compilerArgs') ? compilerArgs.split() : []) } } + } - fromPreset(hostPreset, 'native') { - compilations.main.outputKinds('EXECUTABLE') - compilations.main.extraOpts = (project.hasProperty('compilerArgs') ? compilerArgs.split() : []) + '-opt' - compilations.main.buildTypes = [RELEASE] + targetFromPreset(hostPreset, 'native') { + compilations.main.extraOpts = (project.hasProperty('compilerArgs') ? compilerArgs.split() : []) + '-opt' + binaries { + executable('benchmark', [RELEASE]) { + if (org.gradle.internal.os.OperatingSystem.current().isWindows()) { + linkerOpts("-L${getMingwPath()}/lib") + } + } } } } @@ -70,7 +73,7 @@ MPPTools.addTimeListener(project) MPPTools.createRunTask(project, 'konanRun', kotlin.targets.native) { workingDir = project.provider { - kotlin.targets.native.compilations.main.getBinary('EXECUTABLE', buildType).parentFile + kotlin.targets.native.binaries.getExecutable("benchmark", buildType).outputDirectory } depends("build") args("-w", "$nativeWarmup", "-r", "$attempts", "-o", "${buildDir.absolutePath}/${nativeBenchResults}", "-p", "${project.ext.applicationName}::") diff --git a/tools/benchmarksAnalyzer/build.gradle b/tools/benchmarksAnalyzer/build.gradle index 87e6c7741e7..42364ab006c 100644 --- a/tools/benchmarksAnalyzer/build.gradle +++ b/tools/benchmarksAnalyzer/build.gradle @@ -101,7 +101,9 @@ kotlin { } fromPreset(presets.mingwX64, 'windows') { - compilations.test.linkerOpts "-L${getMingwPath()}/lib" + binaries.all { + linkerOpts = ["-L${getMingwPath()}/lib"] + } compilations.main.cinterops { libcurl { includeDirs.headerFilterOnly "${getMingwPath()}/include"