diff --git a/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/impl/KlibModuleDescriptorFactoryImpl.kt b/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/impl/KlibModuleDescriptorFactoryImpl.kt index 40d8583f68c..c69d63be873 100644 --- a/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/impl/KlibModuleDescriptorFactoryImpl.kt +++ b/compiler/util-klib-metadata/src/org/jetbrains/kotlin/library/metadata/impl/KlibModuleDescriptorFactoryImpl.kt @@ -31,7 +31,7 @@ internal class KlibModuleDescriptorFactoryImpl(val createBuiltIns: (StorageManag KlibModuleOrigin.CAPABILITY to origin, 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 ) diff --git a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/LibraryKinds.kt b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/LibraryKinds.kt index bf62b0ee871..81192e9eb25 100644 --- a/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/LibraryKinds.kt +++ b/idea/idea-analysis/src/org/jetbrains/kotlin/idea/framework/LibraryKinds.kt @@ -36,6 +36,8 @@ import java.util.jar.Attributes import java.util.regex.Pattern 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 } @@ -53,6 +55,8 @@ object CommonLibraryKind : PersistentLibraryKind("kotlin 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 get() = when (this) { is KotlinLibraryKind -> this.compilerPlatform diff --git a/idea/idea-native/src/org/jetbrains/kotlin/ide/konan/NativeIdePlatformKindTooling.kt b/idea/idea-native/src/org/jetbrains/kotlin/ide/konan/NativeIdePlatformKindTooling.kt index 73056128967..69663a9ac61 100644 --- a/idea/idea-native/src/org/jetbrains/kotlin/ide/konan/NativeIdePlatformKindTooling.kt +++ b/idea/idea-native/src/org/jetbrains/kotlin/ide/konan/NativeIdePlatformKindTooling.kt @@ -83,7 +83,6 @@ class NativeIdePlatformKindTooling : IdePlatformKindTooling() { object NativeLibraryKind : PersistentLibraryKind("kotlin.native"), KotlinLibraryKind { override val compilerPlatform: TargetPlatform - // TODO: detect native platform by ??? get() = NativePlatforms.unspecifiedNativePlatform override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!