Keep host_os and host_arch methods for backward-compatibility
Because it is still used by IDE plugin
This commit is contained in:
committed by
TeamCityServer
parent
af3ff6c4d6
commit
d276d583ba
@@ -124,7 +124,11 @@ open class HostManager(
|
|||||||
fun isEnabled(target: KonanTarget) = enabled.contains(target)
|
fun isEnabled(target: KonanTarget) = enabled.contains(target)
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private fun hostOs(): String {
|
@Deprecated("Use `hostOs` instead", ReplaceWith("HostManager.hostOs()"))
|
||||||
|
fun host_os(): String =
|
||||||
|
hostOs()
|
||||||
|
|
||||||
|
fun hostOs(): String {
|
||||||
val javaOsName = System.getProperty("os.name")
|
val javaOsName = System.getProperty("os.name")
|
||||||
return when {
|
return when {
|
||||||
javaOsName == "Mac OS X" -> "osx"
|
javaOsName == "Mac OS X" -> "osx"
|
||||||
@@ -148,7 +152,11 @@ open class HostManager(
|
|||||||
else -> throw TargetSupportException("Unknown host: $host.")
|
else -> throw TargetSupportException("Unknown host: $host.")
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun hostArch(): String {
|
@Deprecated("Use `hostArch` instead", ReplaceWith("HostManager.hostArch()"))
|
||||||
|
fun host_arch(): String =
|
||||||
|
hostArch()
|
||||||
|
|
||||||
|
fun hostArch(): String {
|
||||||
return when (val javaArch = System.getProperty("os.arch")) {
|
return when (val javaArch = System.getProperty("os.arch")) {
|
||||||
"x86_64" -> "x86_64"
|
"x86_64" -> "x86_64"
|
||||||
"amd64" -> "x86_64"
|
"amd64" -> "x86_64"
|
||||||
|
|||||||
Reference in New Issue
Block a user