mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-03-10 08:31:29 +00:00
Revert "Cleanup TargetManager.kt a little bit"
This reverts commit a4010c7a
This commit is contained in:
@@ -9,6 +9,8 @@ interface TargetManager {
|
||||
val target: KonanTarget
|
||||
val targetName: String
|
||||
fun list()
|
||||
val hostTargetSuffix: String
|
||||
val targetSuffix: String
|
||||
}
|
||||
|
||||
internal class TargetManagerImpl(val userRequest: String?, val hostManager: HostManager) : TargetManager {
|
||||
@@ -24,7 +26,7 @@ internal class TargetManagerImpl(val userRequest: String?, val hostManager: Host
|
||||
}
|
||||
}
|
||||
|
||||
private fun determineCurrent(): KonanTarget {
|
||||
fun determineCurrent(): KonanTarget {
|
||||
return if (userRequest == null || userRequest == "host") {
|
||||
HostManager.host
|
||||
} else {
|
||||
@@ -32,6 +34,9 @@ internal class TargetManagerImpl(val userRequest: String?, val hostManager: Host
|
||||
hostManager.targets.getValue(hostManager.known(resolvedAlias))
|
||||
}
|
||||
}
|
||||
|
||||
override val hostTargetSuffix get() = hostTargetSuffix(HostManager.host, target)
|
||||
override val targetSuffix get() = target.name
|
||||
}
|
||||
|
||||
fun hostTargetSuffix(host: KonanTarget, target: KonanTarget) =
|
||||
|
||||
Reference in New Issue
Block a user