[K/N] K1/MPP: Enable splitting 1-stage to two CLI invocations

^KT-59245 Fixed
This commit is contained in:
Vladimir Sukharev
2023-06-25 16:21:34 +02:00
committed by Space Team
parent a87b662bc5
commit 32a390ea18
2 changed files with 4 additions and 2 deletions
@@ -75,11 +75,12 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
// In this implementation, 'arguments' is not changed accordingly to changes in `firstStageConfiguration` and `configuration`,
// since values of fields `produce`, `output`, `freeArgs`, `includes` does not seem to matter downstream in prepareEnvironment()
if (configuration.get(CommonConfigurationKeys.LANGUAGE_VERSION_SETTINGS)
if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR) &&
configuration.get(CommonConfigurationKeys.LANGUAGE_VERSION_SETTINGS)
?.getFeatureSupport(LanguageFeature.MultiPlatformProjects) == LanguageFeature.State.ENABLED)
messageCollector.report(ERROR,
"""
Producing a multiplatform library directly from sources is not allowed.
Producing a multiplatform library directly from sources is not allowed since language version 2.0.
If you use the command-line compiler, then first compile the sources to a KLIB with
the `-p library` compiler flag. Then, use '-Xinclude=<klib>' to pass the KLIB to
@@ -146,6 +146,7 @@ private class ExtTestDataFile(
&& structure.directives[API_VERSION_DIRECTIVE] !in INCOMPATIBLE_API_VERSIONS
&& structure.directives[LANGUAGE_VERSION_DIRECTIVE] !in INCOMPATIBLE_LANGUAGE_VERSIONS
&& !(testDataFileSettings.languageSettings.contains("+${LanguageFeature.MultiPlatformProjects.name}")
&& pipelineType == PipelineType.K2
&& testMode == TestMode.ONE_STAGE_MULTI_MODULE)
private fun isIgnoredTarget(pipelineType: PipelineType, testDataFile: File, backend: TargetBackend): Boolean {