[K/N] Add trivial test for llvm.objc.clang.arc.use lowering

This commit is contained in:
Sergey Bogolepov
2021-08-23 17:04:18 +07:00
committed by TeamCityServer
parent 690d0689a1
commit 9dd8266bee
4 changed files with 58 additions and 0 deletions
@@ -0,0 +1,26 @@
/*
* Copyright 2010-2021 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin
import groovy.lang.Closure
import org.gradle.api.Action
import org.gradle.api.Project
import org.gradle.process.ExecResult
import org.gradle.process.ExecSpec
import org.gradle.util.ConfigureUtil
import org.jetbrains.kotlin.konan.util.DependencyProcessor
fun execLlvmUtility(project: Project, utility: String, action: Action<in ExecSpec>): ExecResult {
val llvmBinDirectory = "${project.platformManager.hostPlatform.absoluteLlvmHome}/bin"
return project.exec(Action<ExecSpec> {
action.execute(this)
executable = "$llvmBinDirectory/$utility"
})
}
fun execLlvmUtility(project: Project, utility: String, closure: Closure<in ExecSpec>): ExecResult {
return execLlvmUtility(project, utility, ConfigureUtil.configureUsing(closure))
}