From 000cf47c2199fea17e92f58bfe9efc55824a99ec Mon Sep 17 00:00:00 2001 From: Dmitriy Dolovov Date: Mon, 17 Apr 2023 15:06:47 +0200 Subject: [PATCH] [PL][JS] Fix: Pass PL CLI arguments properly --- .../jetbrains/kotlin/cli/js/K2JsIrCompiler.kt | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt index f384d73ef5e..44d9852cf8a 100644 --- a/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt +++ b/compiler/cli/cli-js/src/org/jetbrains/kotlin/cli/js/K2JsIrCompiler.kt @@ -259,14 +259,6 @@ class K2JsIrCompiler : CLICompiler() { mainCallArguments = mainCallArguments ) - configuration.setupPartialLinkageConfig( - mode = arguments.partialLinkageMode, - logLevel = arguments.partialLinkageLogLevel, - compilerModeAllowsUsingPartialLinkage = arguments.includes != null, // Don't run PL when producing KLIB. - onWarning = { messageCollector.report(WARNING, it) }, - onError = { messageCollector.report(ERROR, it) } - ) - // Run analysis if main module is sources var sourceModule: ModulesStructure? = null val includes = arguments.includes @@ -719,6 +711,14 @@ class K2JsIrCompiler : CLICompiler() { configuration.put(JSConfigurationKeys.PRINT_REACHABILITY_INFO, arguments.irDcePrintReachabilityInfo) configuration.put(JSConfigurationKeys.FAKE_OVERRIDE_VALIDATOR, arguments.fakeOverrideValidator) + + configuration.setupPartialLinkageConfig( + mode = arguments.partialLinkageMode, + logLevel = arguments.partialLinkageLogLevel, + compilerModeAllowsUsingPartialLinkage = arguments.includes != null, // Don't run PL when producing KLIB. + onWarning = { messageCollector.report(WARNING, it) }, + onError = { messageCollector.report(ERROR, it) } + ) } override fun executableScriptFileName(): String {