Skip to content
This repository has been archived by the owner on Aug 10, 2021. It is now read-only.

Commit

Permalink
Allow IR-less klibs, fix failures when no IR is produced
Browse files Browse the repository at this point in the history
  • Loading branch information
h0tk3y committed Dec 27, 2019
1 parent 2fa1223 commit 4f9a60e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ internal fun produceOutput(context: Context) {
context.config.includeBinaries,
neededLibraries,
context.serializedMetadata!!,
context.serializedIr!!,
context.serializedIr,
versions,
target,
output,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ fun buildLibrary(
included: List<String>,
linkDependencies: List<KonanLibrary>,
metadata: SerializedMetadata,
ir: SerializedIrModule,
ir: SerializedIrModule?,
versions: KotlinLibraryVersioning,
target: KonanTarget,
output: String,
Expand All @@ -57,7 +57,9 @@ fun buildLibrary(
val library = KonanLibraryWriterImpl(File(output), moduleName, versions, target, nopack)

library.addMetadata(metadata)
library.addIr(ir)
if (ir != null) {
library.addIr(ir)
}

natives.forEach {
library.addNativeBitcode(it)
Expand Down

0 comments on commit 4f9a60e

Please sign in to comment.