[klib] Don't pass around metadata serialization closure
Pass the metadata serializer instance instead. This allows to further reduce code duplication by introducing the common interface `KlibSingleFileMetadataSerializer` for abstracting away K1 and K2 representation of a source file, as well as reusing `Fir2KlibMetadataSerializer` across different backends. KT-64392
This commit is contained in:
committed by
Space Team
parent
5a6f51e474
commit
f39335b3f7
+2
-4
@@ -61,7 +61,7 @@ class FirWasmKlibBackendFacade(
|
||||
configuration[CommonConfigurationKeys.MODULE_NAME]!!,
|
||||
configuration,
|
||||
inputArtifact.diagnosticReporter,
|
||||
inputArtifact.sourceFiles,
|
||||
inputArtifact.metadataSerializer,
|
||||
klibPath = outputFile,
|
||||
libraries.map { it.library },
|
||||
inputArtifact.irModuleFragment,
|
||||
@@ -71,9 +71,7 @@ class FirWasmKlibBackendFacade(
|
||||
containsErrorCode = inputArtifact.hasErrors,
|
||||
abiVersion = KotlinAbiVersion.CURRENT, // TODO get from test file data
|
||||
jsOutputName = null
|
||||
) {
|
||||
inputArtifact.serializeSingleFile(it)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
// TODO: consider avoiding repeated libraries resolution
|
||||
|
||||
Reference in New Issue
Block a user