[K/N] Remove global execClang extension
This commit is contained in:
committed by
Space Team
parent
aead2c2bff
commit
3532056e0d
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.konan.exec.Command
|
||||
import org.jetbrains.kotlin.konan.target.HostManager
|
||||
import org.jetbrains.kotlin.konan.target.Family
|
||||
import org.jetbrains.kotlin.konan.target.LinkerOutputKind
|
||||
import org.jetbrains.kotlin.konan.target.PlatformManager
|
||||
import java.io.ByteArrayOutputStream
|
||||
import java.io.File
|
||||
import java.util.regex.Pattern
|
||||
@@ -481,7 +482,8 @@ open class KonanDynamicTest : KonanStandaloneTest() {
|
||||
|
||||
private fun clang() {
|
||||
val log = ByteArrayOutputStream()
|
||||
val plugin = project.extensions.getByType<ExecClang>()
|
||||
val platformManager = project.extensions.getByType<PlatformManager>()
|
||||
val plugin = ExecClang.create(project.objects, platformManager)
|
||||
val artifactsDir = "$outputDirectory/${project.testTarget}"
|
||||
|
||||
fun flagsContain(opt: String) = project.globalTestArgs.contains(opt) || flags.contains(opt)
|
||||
|
||||
+3
-1
@@ -25,6 +25,7 @@ import org.jetbrains.kotlin.cpp.*
|
||||
import org.jetbrains.kotlin.dependencies.NativeDependenciesExtension
|
||||
import org.jetbrains.kotlin.dependencies.NativeDependenciesPlugin
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import org.jetbrains.kotlin.konan.target.PlatformManager
|
||||
import org.jetbrains.kotlin.konan.target.SanitizerKind
|
||||
import org.jetbrains.kotlin.konan.target.TargetDomainObjectContainer
|
||||
import org.jetbrains.kotlin.konan.target.TargetWithSanitizer
|
||||
@@ -205,7 +206,8 @@ open class CompileToBitcodeExtension @Inject constructor(val project: Project) :
|
||||
}
|
||||
|
||||
private val compilationDatabase = project.extensions.getByType<CompilationDatabaseExtension>()
|
||||
private val execClang = project.extensions.getByType<ExecClang>()
|
||||
private val platformManager = project.extensions.getByType<PlatformManager>()
|
||||
private val execClang = ExecClang.create(project.objects, platformManager)
|
||||
private val nativeDependencies = project.extensions.getByType<NativeDependenciesExtension>()
|
||||
|
||||
/**
|
||||
|
||||
@@ -88,7 +88,6 @@ void setupHostAndTarget() {
|
||||
|
||||
void setupClang(Project project) {
|
||||
project.extensions.platformManager = project.project(":kotlin-native").ext.platformManager
|
||||
project.extensions.execClang = org.jetbrains.kotlin.ExecClang.create(project)
|
||||
}
|
||||
|
||||
configurations {
|
||||
|
||||
Reference in New Issue
Block a user