[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
This commit is contained in:
Ivan Kylchik
2023-12-08 16:10:26 +01:00
committed by Space Team
parent 569d37028f
commit c902e5f565
@@ -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 ||