[K/N][lower] Fixed bug with phases for metadata klibs
This commit is contained in:
+13
-5
@@ -451,15 +451,22 @@ internal val disposeGenerationStatePhase = namedUnitPhase(
|
|||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
private val phasesOverMainModule = NamedCompilerPhase(
|
||||||
|
name = "PhasesOverMainModule",
|
||||||
|
description = "Phases over main module",
|
||||||
|
lower = takeFromContext<Context, Unit, IrModuleFragment> { it.irModule!! } then
|
||||||
|
specialBackendChecksPhase then
|
||||||
|
backendCodegen then
|
||||||
|
unitSink(),
|
||||||
|
prerequisite = setOf(psiToIrPhase)
|
||||||
|
)
|
||||||
|
|
||||||
private val entireBackend = NamedCompilerPhase(
|
private val entireBackend = NamedCompilerPhase(
|
||||||
name = "EntireBackend",
|
name = "EntireBackend",
|
||||||
description = "Entire backend",
|
description = "Entire backend",
|
||||||
lower = createGenerationStatePhase then
|
lower = createGenerationStatePhase then
|
||||||
buildAdditionalCacheInfoPhase then
|
buildAdditionalCacheInfoPhase then
|
||||||
takeFromContext { it.irModule!! } then
|
phasesOverMainModule then
|
||||||
specialBackendChecksPhase then
|
|
||||||
backendCodegen then
|
|
||||||
unitSink() then
|
|
||||||
saveAdditionalCacheInfoPhase then
|
saveAdditionalCacheInfoPhase then
|
||||||
produceOutputPhase then
|
produceOutputPhase then
|
||||||
objectFilesPhase then
|
objectFilesPhase then
|
||||||
@@ -526,6 +533,7 @@ internal fun PhaseConfig.konanPhasesConfig(config: KonanConfig) {
|
|||||||
disableUnless(finalizeCachePhase, config.produce.isCache)
|
disableUnless(finalizeCachePhase, config.produce.isCache)
|
||||||
disableUnless(exportInternalAbiPhase, config.produce.isCache)
|
disableUnless(exportInternalAbiPhase, config.produce.isCache)
|
||||||
disableUnless(buildCExportsPhase, config.produce.isNativeLibrary)
|
disableUnless(buildCExportsPhase, config.produce.isNativeLibrary)
|
||||||
|
disableUnless(functionsWithoutBoundCheck, config.involvesCodegen)
|
||||||
disableUnless(backendCodegen, config.involvesCodegen)
|
disableUnless(backendCodegen, config.involvesCodegen)
|
||||||
disableUnless(checkExternalCallsPhase, getBoolean(KonanConfigKeys.CHECK_EXTERNAL_CALLS))
|
disableUnless(checkExternalCallsPhase, getBoolean(KonanConfigKeys.CHECK_EXTERNAL_CALLS))
|
||||||
disableUnless(rewriteExternalCallsCheckerGlobals, getBoolean(KonanConfigKeys.CHECK_EXTERNAL_CALLS))
|
disableUnless(rewriteExternalCallsCheckerGlobals, getBoolean(KonanConfigKeys.CHECK_EXTERNAL_CALLS))
|
||||||
@@ -566,7 +574,7 @@ internal fun PhaseConfig.konanPhasesConfig(config: KonanConfig) {
|
|||||||
if (config.metadataKlib || config.omitFrameworkBinary) {
|
if (config.metadataKlib || config.omitFrameworkBinary) {
|
||||||
disable(psiToIrPhase)
|
disable(psiToIrPhase)
|
||||||
disable(copyDefaultValuesToActualPhase)
|
disable(copyDefaultValuesToActualPhase)
|
||||||
disable(specialBackendChecksPhase)
|
disable(phasesOverMainModule)
|
||||||
disable(checkSamSuperTypesPhase)
|
disable(checkSamSuperTypesPhase)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user