Add filtering for standard KLIBs
This commit is contained in:
committed by
Ilya Matveev
parent
c3638e48dc
commit
5503b12a17
@@ -159,9 +159,11 @@ internal open class KonanLibrarySearchPathResolver(
|
||||
|
||||
if (!noDefaultLibs) {
|
||||
val defaultLibs = defaultRoots.flatMap { it.listFiles }
|
||||
.asSequence()
|
||||
.filterNot { it.name.startsWith('.') }
|
||||
.filterNot { it.name.removeSuffixIfPresent(KLIB_FILE_EXTENSION_WITH_DOT) == KONAN_STDLIB_NAME }
|
||||
.map { UnresolvedLibrary(it.absolutePath, null) }
|
||||
.map {resolve(it, isDefaultLink = true) }
|
||||
.map { resolve(it, isDefaultLink = true) }
|
||||
result.addAll(defaultLibs)
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -37,7 +37,9 @@ internal fun zippedKonanLibraryChecks(klibFile: File) {
|
||||
check(klibFile.isFile) { "Expected $klibFile to be a regular file." }
|
||||
|
||||
val extension = klibFile.extension
|
||||
check(extension.isEmpty() || extension == KLIB_FILE_EXTENSION) { "Unexpected file extension: $extension" }
|
||||
check(extension.isEmpty() || extension == KLIB_FILE_EXTENSION) {
|
||||
"KLIB path has unexpected extension: $klibFile"
|
||||
}
|
||||
}
|
||||
|
||||
private class UnzippedKonanLibraryLayout(override val libDir: File, override val target: KonanTarget?): KonanLibraryLayoutImpl {
|
||||
|
||||
Reference in New Issue
Block a user