[PL] Change semantics of CLI parameter -Xpartial-linkage

This parameter accepts the name of the "mode" in which the partial linkage would work. Currently, only two options are supported: 'enable', 'disable'. But the list may be extended in the future as needed.

At the moment the 'disable' option is the default one. This will be changed in #KT-51447, #KT-51443.
This commit is contained in:
Dmitriy Dolovov
2023-03-29 19:43:40 +02:00
committed by Space Team
parent a450866db3
commit 46ed6e5766
8 changed files with 50 additions and 18 deletions
@@ -172,7 +172,10 @@ class K2JsIrCompiler : CLICompiler<K2JSCompilerArguments>() {
configuration.put(JSConfigurationKeys.WASM_ENABLE_ARRAY_RANGE_CHECKS, arguments.wasmEnableArrayRangeChecks)
configuration.put(JSConfigurationKeys.WASM_ENABLE_ASSERTS, arguments.wasmEnableAsserts)
configuration.put(JSConfigurationKeys.WASM_GENERATE_WAT, arguments.wasmGenerateWat)
configuration.setupPartialLinkageConfig(arguments.partialLinkage, arguments.partialLinkageLogLevel)
configuration.setupPartialLinkageConfig(arguments.partialLinkageMode, arguments.partialLinkageLogLevel) { errorMessage ->
messageCollector.report(ERROR, errorMessage, null)
return COMPILATION_ERROR
}
val commonSourcesArray = arguments.commonSources
val commonSources = commonSourcesArray?.toSet() ?: emptySet()