[K/N] Don't add linkDependencies when serializing a metadata klib

^KT-56205 Verification Pending
This commit is contained in:
Sebastian Sellmair
2023-01-30 15:45:54 +01:00
committed by Space Team
parent 1978566fee
commit b6ea04d789
3 changed files with 72 additions and 13 deletions
@@ -48,20 +48,28 @@ internal val WriteKlibPhase = createSimpleNamedCompilerPhase<PhaseContext, Seria
}
}
/*
metadata libraries do not have 'link' dependencies, as there are several reasons
why a consumer might not be able to provide the same compile classpath as the producer
(e.g. commonized cinterops, host vs client environment differences).
*/
val linkDependencies = if (context.config.metadataKlib) emptyList()
else input.neededLibraries
buildLibrary(
config.nativeLibraries,
config.includeBinaries,
input.neededLibraries,
input.serializedMetadata!!,
input.serializedIr,
versions,
target,
output,
libraryName,
nopack,
shortLibraryName,
manifestProperties,
input.dataFlowGraph
natives = config.nativeLibraries,
included = config.includeBinaries,
linkDependencies = linkDependencies,
metadata = input.serializedMetadata!!,
ir = input.serializedIr,
versions = versions,
target = target,
output = output,
moduleName = libraryName,
nopack = nopack,
shortName = shortLibraryName,
manifestProperties = manifestProperties,
dataFlowGraph = input.dataFlowGraph
)
}