diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index 843d30db137..59e570cb83b 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt @@ -153,10 +153,11 @@ class K2JsIrCompiler : CLICompiler() { // TODO: pass logger attached to message collector here. ).libraryResolver() val resolvedLibraries = libraryResolver.resolveWithDependencies(unresolvedLibraries, true, true, true) - val friendDependencies = resolvedLibraries.getFullList() - .filter { - it.moduleName in friendLibraries - } + + val friendAbsolutePaths = friendLibraries.map { File(it).absolutePath } + val friendDependencies = resolvedLibraries.getFullList().filter { + it.libraryFile.absolutePath in friendAbsolutePaths + } val produceKind = produceMap[arguments.irProduceOnly] if (produceKind == null) {