Don't serialize anything to a final kexe file. (#413)
That gives a little compilation speed improvement.
This commit is contained in:
committed by
Nikolay Igotti
parent
8e38e28f89
commit
db7b22bbb1
+1
-1
@@ -214,7 +214,7 @@ internal class Context(config: KonanConfig) : KonanBackendContext(config) {
|
||||
// right after the frontend.
|
||||
// But we have to wait until the code generation phase,
|
||||
// to dump this information into generated file.
|
||||
lateinit var serializedLinkData: String
|
||||
var serializedLinkData: String? = null
|
||||
|
||||
// TODO: make lateinit?
|
||||
var irModule: IrModuleFragment? = null
|
||||
|
||||
+4
-1
@@ -57,9 +57,12 @@ object KonanPhases {
|
||||
with (config.configuration) { with (KonanConfigKeys) {
|
||||
|
||||
// We disable inline IR deserialization
|
||||
// until we have enough test passes
|
||||
// until we have enough test passes.
|
||||
KonanPhase.DESERIALIZER.enabled = false
|
||||
|
||||
// Don't serialize anything to a final executable.
|
||||
KonanPhase.SERIALIZER.enabled = getBoolean(NOLINK)
|
||||
|
||||
val disabled = get(DISABLED_PHASES)
|
||||
disabled?.forEach { phases[known(it)]!!.enabled = false }
|
||||
|
||||
|
||||
+3
-1
@@ -149,10 +149,12 @@ internal class MetadataGenerator(override val context: Context): ContextUtils {
|
||||
}
|
||||
|
||||
private fun addLinkData(module: IrModuleFragment) {
|
||||
val moduleAsString = context.serializedLinkData
|
||||
if (moduleAsString == null) return
|
||||
|
||||
val abiVersion = context.config.configuration.get(KonanConfigKeys.ABI_VERSION)
|
||||
val abiNode = metadataString("$abiVersion")
|
||||
val moduleName = metadataString(module.descriptor.name.asString())
|
||||
val moduleAsString = context.serializedLinkData
|
||||
val dataNode = metadataString(moduleAsString)
|
||||
|
||||
val kmetadataArg = metadataNode(listOf(abiNode, moduleName, dataNode))
|
||||
|
||||
Reference in New Issue
Block a user