CIDR: Patch LLDB pretty printers for K/N < 1.1.1
Issue #KT-29625 Fixed
This commit is contained in:
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=stdlib
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=linux
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=posix
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=zlib
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=Foundation
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=UIKit
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=objc
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=iconv
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=opengl32
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
+1
-1
@@ -1,2 +1,2 @@
|
||||
unique_name=windows
|
||||
compiler_version=1.0
|
||||
compiler_version=1.0.0
|
||||
|
||||
@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.name.FqName
|
||||
|
||||
const val KLIB_PROPERTY_ABI_VERSION = "abi_version"
|
||||
const val KLIB_PROPERTY_UNIQUE_NAME = "unique_name"
|
||||
const val KLIB_PROPERTY_COMPILER_VERSION = "compiler_version"
|
||||
const val KLIB_PROPERTY_LINKED_OPTS = "linkerOpts"
|
||||
const val KLIB_PROPERTY_DEPENDS = "depends"
|
||||
const val KLIB_PROPERTY_INTEROP = "interop"
|
||||
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. 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.konan.library.lite
|
||||
|
||||
data class LiteKonanDistribution(
|
||||
val distributionHome: String,
|
||||
val kotlinNativeVersion: KotlinVersion,
|
||||
val kotlinNativeVersionString: String
|
||||
)
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
/*
|
||||
* Copyright 2010-2019 JetBrains s.r.o. 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.konan.library.lite
|
||||
|
||||
import org.jetbrains.kotlin.konan.library.KONAN_STDLIB_NAME
|
||||
import org.jetbrains.kotlin.konan.library.konanCommonLibraryPath
|
||||
import java.nio.file.Paths
|
||||
|
||||
class LiteKonanDistributionInfoProvider(private val konanHomeDir: String) {
|
||||
|
||||
fun getDistributionInfo(): LiteKonanDistribution? {
|
||||
val stdlibInfo = LiteKonanLibraryInfoProvider(konanHomeDir).getDistributionLibraryInfo(
|
||||
Paths.get(konanHomeDir).resolve(konanCommonLibraryPath(KONAN_STDLIB_NAME))
|
||||
) ?: return null
|
||||
|
||||
val versionString = stdlibInfo.compilerVersion
|
||||
val version = versionString.substringBefore('-')
|
||||
.split('.')
|
||||
.takeIf { it.size == 3 }
|
||||
?.mapNotNull { it.toIntOrNull() }
|
||||
?.takeIf { it.size == 3 }
|
||||
?.let {
|
||||
KotlinVersion(it[0], it[1], it[2])
|
||||
} ?: return null
|
||||
|
||||
return LiteKonanDistribution(konanHomeDir, version, versionString)
|
||||
}
|
||||
}
|
||||
+2
-1
@@ -10,5 +10,6 @@ import java.nio.file.Path
|
||||
data class LiteKonanLibrary(
|
||||
val path: Path,
|
||||
val name: String,
|
||||
val platform: String?
|
||||
val platform: String?,
|
||||
internal val compilerVersion: String
|
||||
)
|
||||
|
||||
+3
-1
@@ -7,6 +7,7 @@ package org.jetbrains.kotlin.konan.library.lite
|
||||
|
||||
import org.jetbrains.kotlin.konan.library.KLIB_DIR_NAME
|
||||
import org.jetbrains.kotlin.konan.library.KLIB_MANIFEST_FILE_NAME
|
||||
import org.jetbrains.kotlin.konan.library.KLIB_PROPERTY_COMPILER_VERSION
|
||||
import org.jetbrains.kotlin.konan.library.KLIB_PROPERTY_UNIQUE_NAME
|
||||
import java.io.IOException
|
||||
import java.nio.file.Files
|
||||
@@ -68,8 +69,9 @@ class LiteKonanLibraryInfoProvider(customKonanHomeDir: String? = null) {
|
||||
}
|
||||
|
||||
val name = manifestProperties[KLIB_PROPERTY_UNIQUE_NAME]?.toString() ?: return null
|
||||
val compilerVersion = manifestProperties[KLIB_PROPERTY_COMPILER_VERSION]?.toString() ?: return null
|
||||
|
||||
return LiteKonanLibrary(libraryPath, name, platform)
|
||||
return LiteKonanLibrary(libraryPath, name, platform, compilerVersion)
|
||||
}
|
||||
|
||||
private fun isUnderKonanRoot(libraryPath: Path): Boolean {
|
||||
|
||||
Reference in New Issue
Block a user