Dropped outdated klib version compatibility mechanisms
(cherry picked from commit 31fe91b6553ba08b83c581bfa8341e4a21805e97)
This commit is contained in:
committed by
Stanislav Erokhin
parent
780c7929fa
commit
edfdc88d6d
@@ -191,9 +191,6 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
|
||||
arguments.disablePhases.toNonNullList())
|
||||
put(LIST_PHASES, arguments.listPhases)
|
||||
|
||||
put(COMPATIBLE_COMPILER_VERSIONS,
|
||||
arguments.compatibleCompilerVersions.toNonNullList())
|
||||
|
||||
put(ENABLE_ASSERTIONS, arguments.enableAssertions)
|
||||
|
||||
put(MEMORY_MODEL, when (arguments.memoryModel) {
|
||||
|
||||
-3
@@ -121,9 +121,6 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
|
||||
@Argument(value="-Xcheck-dependencies", deprecatedName = "--check_dependencies", description = "Check dependencies and download the missing ones")
|
||||
var checkDependencies: Boolean = false
|
||||
|
||||
@Argument(value="-Xcompatible-compiler-version", valueDescription = "<version>", description = "Assume the given compiler version to be binary compatible")
|
||||
var compatibleCompilerVersions: Array<String>? = null
|
||||
|
||||
@Argument(value = EMBED_BITCODE_FLAG, description = "Embed LLVM IR bitcode as data")
|
||||
var embedBitcode: Boolean = false
|
||||
|
||||
|
||||
-2
@@ -14,8 +14,6 @@ class KonanConfigKeys {
|
||||
// Keep the list lexically sorted.
|
||||
val CHECK_DEPENDENCIES: CompilerConfigurationKey<Boolean>
|
||||
= CompilerConfigurationKey.create("check dependencies and download the missing ones")
|
||||
val COMPATIBLE_COMPILER_VERSIONS: CompilerConfigurationKey<List<String>>
|
||||
= CompilerConfigurationKey.create("compatible compiler versions")
|
||||
val DEBUG: CompilerConfigurationKey<Boolean>
|
||||
= CompilerConfigurationKey.create("add debug information")
|
||||
val DISABLE_FAKE_OVERRIDE_VALIDATOR: CompilerConfigurationKey<Boolean>
|
||||
|
||||
-4
@@ -53,15 +53,11 @@ class KonanLibrariesResolveSupport(
|
||||
}
|
||||
}
|
||||
|
||||
private val compatibleCompilerVersions: List<CompilerVersion> =
|
||||
configuration.getList(KonanConfigKeys.COMPATIBLE_COMPILER_VERSIONS).map { it.parseCompilerVersion() }
|
||||
|
||||
private val resolver = defaultResolver(
|
||||
repositories,
|
||||
libraryNames.filter { it.contains(File.separator) },
|
||||
target,
|
||||
distribution,
|
||||
compatibleCompilerVersions,
|
||||
resolverLogger
|
||||
).libraryResolver()
|
||||
|
||||
|
||||
+3
-11
@@ -11,31 +11,27 @@ import org.jetbrains.kotlin.library.impl.createKotlinLibrary
|
||||
import org.jetbrains.kotlin.util.DummyLogger
|
||||
import org.jetbrains.kotlin.util.Logger
|
||||
|
||||
interface SearchPathResolverWithTarget<L: KotlinLibrary>: SearchPathResolverWithAttributes<L> {
|
||||
interface SearchPathResolverWithTarget<L: KotlinLibrary>: SearchPathResolver<L> {
|
||||
val target: KonanTarget
|
||||
}
|
||||
|
||||
fun defaultResolver(
|
||||
repositories: List<String>,
|
||||
target: KonanTarget,
|
||||
distribution: Distribution,
|
||||
compatibleCompilerVersions: List<CompilerVersion> = emptyList()
|
||||
): SearchPathResolverWithTarget<KonanLibrary> = defaultResolver(repositories, emptyList(), target, distribution, compatibleCompilerVersions)
|
||||
distribution: Distribution
|
||||
): SearchPathResolverWithTarget<KonanLibrary> = defaultResolver(repositories, emptyList(), target, distribution)
|
||||
|
||||
fun defaultResolver(
|
||||
repositories: List<String>,
|
||||
directLibs: List<String>,
|
||||
target: KonanTarget,
|
||||
distribution: Distribution,
|
||||
compatibleCompilerVersions: List<CompilerVersion> = emptyList(),
|
||||
logger: Logger = DummyLogger,
|
||||
skipCurrentDir: Boolean = false
|
||||
): SearchPathResolverWithTarget<KonanLibrary> = KonanLibraryProperResolver(
|
||||
repositories,
|
||||
directLibs,
|
||||
target,
|
||||
listOf(KotlinAbiVersion.CURRENT),
|
||||
compatibleCompilerVersions,
|
||||
distribution.klib,
|
||||
distribution.localKonanDir.absolutePath,
|
||||
skipCurrentDir,
|
||||
@@ -65,16 +61,12 @@ internal class KonanLibraryProperResolver(
|
||||
repositories: List<String>,
|
||||
directLibs: List<String>,
|
||||
override val target: KonanTarget,
|
||||
knownAbiVersions: List<KotlinAbiVersion>?,
|
||||
knownCompilerVersions: List<CompilerVersion>?,
|
||||
distributionKlib: String?,
|
||||
localKonanDir: String?,
|
||||
skipCurrentDir: Boolean,
|
||||
override val logger: Logger
|
||||
) : KotlinLibraryProperResolverWithAttributes<KonanLibrary>(
|
||||
repositories, directLibs,
|
||||
knownAbiVersions,
|
||||
knownCompilerVersions,
|
||||
distributionKlib,
|
||||
localKonanDir,
|
||||
skipCurrentDir,
|
||||
|
||||
Reference in New Issue
Block a user