[K/N] Added new output kind (will be used later)
PRELIMINARY_CACHE only builds additional (IR-based) info for a cache, will be used later in per-file caches
This commit is contained in:
+3
@@ -34,6 +34,7 @@ val KonanConfig.isFinalBinary: Boolean get() = when (this.produce) {
|
||||
CompilerOutputKind.DYNAMIC_CACHE, CompilerOutputKind.STATIC_CACHE,
|
||||
CompilerOutputKind.LIBRARY, CompilerOutputKind.BITCODE -> false
|
||||
CompilerOutputKind.FRAMEWORK -> !omitFrameworkBinary
|
||||
else -> error("Unknown compiler output kind")
|
||||
}
|
||||
|
||||
val CompilerOutputKind.involvesBitcodeGeneration: Boolean
|
||||
@@ -49,6 +50,7 @@ val KonanConfig.involvesLinkStage: Boolean
|
||||
CompilerOutputKind.STATIC-> true
|
||||
CompilerOutputKind.LIBRARY, CompilerOutputKind.BITCODE -> false
|
||||
CompilerOutputKind.FRAMEWORK -> !omitFrameworkBinary
|
||||
else -> error("Unknown compiler output kind")
|
||||
}
|
||||
|
||||
val CompilerOutputKind.isCache: Boolean
|
||||
@@ -255,6 +257,7 @@ internal fun produceOutput(context: Context) {
|
||||
LLVMWriteBitcodeToFile(context.llvmModule!!, output)
|
||||
}
|
||||
null -> {}
|
||||
else -> error("Unknown compiler output kind")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -34,6 +34,9 @@ enum class CompilerOutputKind {
|
||||
STATIC_CACHE {
|
||||
override fun suffix(target: KonanTarget?) = ".${target!!.family.staticSuffix}"
|
||||
override fun prefix(target: KonanTarget?) = target!!.family.staticPrefix
|
||||
},
|
||||
PRELIMINARY_CACHE {
|
||||
override fun suffix(target: KonanTarget?) = ""
|
||||
};
|
||||
|
||||
abstract fun suffix(target: KonanTarget? = null): String
|
||||
|
||||
Reference in New Issue
Block a user