Do not apply purging to user provided libraries.
This commit is contained in:
committed by
alexander-gorshenev
parent
93445f5546
commit
35eff51749
+1
@@ -28,6 +28,7 @@ interface KonanLibraryReader {
|
||||
val linkerOpts: List<String>
|
||||
val unresolvedDependencies: List<String>
|
||||
val escapeAnalysis: ByteArray?
|
||||
val isDefaultLink: Boolean get() = false
|
||||
val isNeededForLink: Boolean get() = true
|
||||
val manifestProperties: Properties
|
||||
val moduleHeaderData: ByteArray
|
||||
|
||||
+1
-1
@@ -49,7 +49,7 @@ fun SearchPathResolver.resolveImmediateLibraries(libraryNames: List<String>,
|
||||
removeDuplicates: Boolean = true): List<LibraryReaderImpl> {
|
||||
|
||||
val defaultLibraries = defaultLinks(nostdlib = noStdLib, noDefaultLibs = noDefaultLibs).map {
|
||||
LibraryReaderImpl(it, abiVersion, target)
|
||||
LibraryReaderImpl(it, abiVersion, target, isDefaultLink = true)
|
||||
}
|
||||
|
||||
val userProvidedLibraries = libraryNames
|
||||
|
||||
+3
-2
@@ -26,7 +26,7 @@ import org.jetbrains.kotlin.config.LanguageVersionSettings
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
|
||||
class LibraryReaderImpl(var libraryFile: File, val currentAbiVersion: Int,
|
||||
val target: KonanTarget? = null)
|
||||
val target: KonanTarget? = null, override val isDefaultLink: Boolean = false)
|
||||
: KonanLibraryReader {
|
||||
|
||||
// For the zipped libraries inPlace gives files from zip file system
|
||||
@@ -98,4 +98,5 @@ class LibraryReaderImpl(var libraryFile: File, val currentAbiVersion: Int,
|
||||
|
||||
}
|
||||
|
||||
internal fun <T: KonanLibraryReader> List<T>.purgeUnneeded(): List<T> = this.filter{ it.isNeededForLink }
|
||||
internal fun <T: KonanLibraryReader> List<T>.purgeUnneeded(): List<T> = this.filter{ !it.isDefaultLink || it.isNeededForLink }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user