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 target: KonanTarget
|
||||||
val targetName: String
|
val targetName: String
|
||||||
fun list()
|
fun list()
|
||||||
|
val hostTargetSuffix: String
|
||||||
|
val targetSuffix: String
|
||||||
}
|
}
|
||||||
|
|
||||||
internal class TargetManagerImpl(val userRequest: String?, val hostManager: HostManager) : TargetManager {
|
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") {
|
return if (userRequest == null || userRequest == "host") {
|
||||||
HostManager.host
|
HostManager.host
|
||||||
} else {
|
} else {
|
||||||
@@ -32,6 +34,9 @@ internal class TargetManagerImpl(val userRequest: String?, val hostManager: Host
|
|||||||
hostManager.targets.getValue(hostManager.known(resolvedAlias))
|
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) =
|
fun hostTargetSuffix(host: KonanTarget, target: KonanTarget) =
|
||||||
|
|||||||
Reference in New Issue
Block a user