KT-58862: Remove cinterop -mode option
metadata cinterop libraries perform pretty well for years, so we can drop this flag.
This commit is contained in:
committed by
Space Team
parent
807e7f1c28
commit
d433d1eb3f
-6
@@ -53,8 +53,6 @@ open class CommonInteropArguments(val argParser: ArgParser) {
|
||||
.default("unspecified")
|
||||
val repo by argParser.option(ArgType.String, shortName = "r", description = "repository to resolve dependencies")
|
||||
.multiple()
|
||||
val mode by argParser.option(ArgType.Choice<GenerationMode>(), description = "the way interop library is generated")
|
||||
.default(DEFAULT_MODE)
|
||||
val nodefaultlibs by argParser.option(ArgType.Boolean, NODEFAULTLIBS,
|
||||
description = "don't link the libraries from dist/klib automatically").default(false)
|
||||
val nodefaultlibsDeprecated by argParser.option(ArgType.Boolean, NODEFAULTLIBS_DEPRECATED,
|
||||
@@ -76,10 +74,6 @@ open class CommonInteropArguments(val argParser: ArgParser) {
|
||||
fullName = "Xoverride-konan-properties",
|
||||
description = "Override konan.properties.values"
|
||||
).multiple().delimiter(";")
|
||||
|
||||
companion object {
|
||||
val DEFAULT_MODE = GenerationMode.METADATA
|
||||
}
|
||||
}
|
||||
|
||||
open class CInteropArguments(argParser: ArgParser =
|
||||
|
||||
+4
-12
@@ -291,17 +291,6 @@ private fun processCLib(
|
||||
|
||||
val outKtPkg = fqParts.joinToString(".")
|
||||
|
||||
val mode = run {
|
||||
val providedMode = cinteropArguments.mode
|
||||
|
||||
if (providedMode == GenerationMode.METADATA && flavor == KotlinPlatform.JVM) {
|
||||
warn("Metadata mode isn't supported for Kotlin/JVM! Falling back to sourcecode.")
|
||||
GenerationMode.SOURCE_CODE
|
||||
} else {
|
||||
providedMode
|
||||
}
|
||||
}
|
||||
|
||||
val resolver = getLibraryResolver(cinteropArguments, tool.target)
|
||||
|
||||
val allLibraryDependencies = when (flavor) {
|
||||
@@ -349,7 +338,10 @@ private fun processCLib(
|
||||
} else {
|
||||
{}
|
||||
}
|
||||
|
||||
val mode = when (flavor) {
|
||||
KotlinPlatform.JVM -> GenerationMode.SOURCE_CODE
|
||||
KotlinPlatform.NATIVE -> GenerationMode.METADATA
|
||||
}
|
||||
val stubIrContext = StubIrContext(logger, configuration, nativeIndex, imports, flavor, mode, libName, plugin)
|
||||
val stubIrOutput = run {
|
||||
val outKtFileCreator = {
|
||||
|
||||
Reference in New Issue
Block a user