Minor. Add comments
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ internal class KlibModuleDescriptorFactoryImpl(val createBuiltIns: (StorageManag
|
|||||||
KlibModuleOrigin.CAPABILITY to origin,
|
KlibModuleOrigin.CAPABILITY to origin,
|
||||||
ImplicitIntegerCoercion.MODULE_CAPABILITY to origin.isInteropLibrary()
|
ImplicitIntegerCoercion.MODULE_CAPABILITY to origin.isInteropLibrary()
|
||||||
),
|
),
|
||||||
// TODO: detect native platform by ???
|
// TODO: don't use hardcoded platform; it should be supplied as a parameter
|
||||||
platform = NativePlatforms.unspecifiedNativePlatform
|
platform = NativePlatforms.unspecifiedNativePlatform
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,8 @@ import java.util.jar.Attributes
|
|||||||
import java.util.regex.Pattern
|
import java.util.regex.Pattern
|
||||||
|
|
||||||
interface KotlinLibraryKind {
|
interface KotlinLibraryKind {
|
||||||
|
// TODO: Drop this property. See https://youtrack.jetbrains.com/issue/KT-38233
|
||||||
|
// This property returns approximate library platform, as the real platform can be evaluated only for concrete library.
|
||||||
val compilerPlatform: TargetPlatform
|
val compilerPlatform: TargetPlatform
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -53,6 +55,8 @@ object CommonLibraryKind : PersistentLibraryKind<DummyLibraryProperties>("kotlin
|
|||||||
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!
|
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: Drop this property. See https://youtrack.jetbrains.com/issue/KT-38233
|
||||||
|
// It returns approximate library platform, as the real platform can be evaluated only for concrete library.
|
||||||
val PersistentLibraryKind<*>?.platform: TargetPlatform
|
val PersistentLibraryKind<*>?.platform: TargetPlatform
|
||||||
get() = when (this) {
|
get() = when (this) {
|
||||||
is KotlinLibraryKind -> this.compilerPlatform
|
is KotlinLibraryKind -> this.compilerPlatform
|
||||||
|
|||||||
@@ -83,7 +83,6 @@ class NativeIdePlatformKindTooling : IdePlatformKindTooling() {
|
|||||||
|
|
||||||
object NativeLibraryKind : PersistentLibraryKind<DummyLibraryProperties>("kotlin.native"), KotlinLibraryKind {
|
object NativeLibraryKind : PersistentLibraryKind<DummyLibraryProperties>("kotlin.native"), KotlinLibraryKind {
|
||||||
override val compilerPlatform: TargetPlatform
|
override val compilerPlatform: TargetPlatform
|
||||||
// TODO: detect native platform by ???
|
|
||||||
get() = NativePlatforms.unspecifiedNativePlatform
|
get() = NativePlatforms.unspecifiedNativePlatform
|
||||||
|
|
||||||
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!
|
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!
|
||||||
|
|||||||
Reference in New Issue
Block a user