From c902e5f56504e8572f9bc13f424de8bfb7f86d39 Mon Sep 17 00:00:00 2001 From: Ivan Kylchik Date: Fri, 8 Dec 2023 16:10:26 +0100 Subject: [PATCH] [JVM_IR] Allow to use `irPluginContext` when compiling for android This problem is extensively described in `cadbc87dfd1ce3e63481ab90874ca8858878c55f` commit message. TLDR: compiler is also called from Android LiveEdit plugin where we want to be able to use compiler plugins. For that reason, we have two different flags in the compiler. One is only for "evaluate expression" (`doNotLoadDependencyModuleHeaders`) and the other for both LiveEdit plugin and "evaluate expression" (`shouldStubAndNotLinkUnboundSymbols)`. We want to forbid using compiler extensions for "evaluate expression" and allow for LiveEdit plugin. #KT-63695 --- .../src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt index c02d5c9845b..acc5ee31ebe 100644 --- a/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt +++ b/compiler/ir/backend.jvm/entrypoint/src/org/jetbrains/kotlin/backend/jvm/JvmIrCodegenFactory.kt @@ -212,7 +212,7 @@ open class JvmIrCodegenFactory( psi2irContext.irBuiltIns, irLinker, messageLogger - ).takeIf { !ideCodegenSettings.shouldStubAndNotLinkUnboundSymbols } + ).takeIf { !ideCodegenSettings.doNotLoadDependencyModuleHeaders } if (pluginExtensions.isNotEmpty() && pluginContext != null) { for (extension in pluginExtensions) { if (psi2irContext.configuration.generateBodies ||