Recursively resolve libraries after immediateLibraries have been calculated.

This commit is contained in:
Alexander Gorshenev
2017-10-19 20:25:03 +03:00
committed by alexander-gorshenev
parent e2e883ee08
commit 7d8f7e54c3
@@ -89,14 +89,15 @@ class KonanConfig(val project: Project, val configuration: CompilerConfiguration
false false
).let { ).let {
warnOnLibraryDuplicates(it.map { it.libraryFile }) warnOnLibraryDuplicates(it.map { it.libraryFile })
it.distinctBy { it.libraryFile.absolutePath } val result = it.distinctBy { it.libraryFile.absolutePath }
resolver.resolveLibrariesRecursive(result, targetManager.target, currentAbiVersion)
result
} }
} }
fun librariesWithDependencies(moduleDescriptor: ModuleDescriptor?): List<KonanLibraryReader> { fun librariesWithDependencies(moduleDescriptor: ModuleDescriptor?): List<KonanLibraryReader> {
if (moduleDescriptor == null) error("purgeUnneeded() only works correctly after resolve is over, and we have successfully marked package files as needed or not needed.") if (moduleDescriptor == null) error("purgeUnneeded() only works correctly after resolve is over, and we have successfully marked package files as needed or not needed.")
resolver.resolveLibrariesRecursive(immediateLibraries, targetManager.target, currentAbiVersion)
return immediateLibraries.purgeUnneeded().withResolvedDependencies() return immediateLibraries.purgeUnneeded().withResolvedDependencies()
} }