[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
@@ -270,7 +270,9 @@ fun CompilerConfiguration.setupFromArguments(arguments: K2NativeCompilerArgument
putIfNotNull(RUNTIME_LOGS, arguments.runtimeLogs)
putIfNotNull(BUNDLE_ID, parseBundleId(arguments, outputKind, this@setupFromArguments))
arguments.testDumpOutputPath?.let { put(TEST_DUMP_OUTPUT_PATH, it) }
setupPartialLinkageConfig(arguments.partialLinkage, arguments.partialLinkageLogLevel)
setupPartialLinkageConfig(arguments.partialLinkageMode, arguments.partialLinkageLogLevel) { errorMessage ->
report(ERROR, errorMessage)
}
put(OMIT_FRAMEWORK_BINARY, arguments.omitFrameworkBinary)
putIfNotNull(COMPILE_FROM_BITCODE, parseCompileFromBitcode(arguments, this@setupFromArguments, outputKind))
putIfNotNull(SERIALIZED_DEPENDENCIES, parseSerializedDependencies(arguments, this@setupFromArguments))