K2: add missing MPP warning in LightTree mode

This commit is contained in:
Ilya Chernikov
2022-12-21 14:08:51 +01:00
committed by Space Team
parent 73e0a5ccd3
commit 19a0a1fcd8
@@ -108,6 +108,14 @@ fun compileModulesUsingFrontendIrAndLightTree(
"ATTENTION!\n This build uses experimental K2 compiler: \n -Xuse-k2"
)
if (compilerConfiguration.languageVersionSettings.supportsFeature(LanguageFeature.MultiPlatformProjects)) {
messageCollector.report(
CompilerMessageSeverity.ERROR,
"K2 compiler does not support multi-platform projects yet, so please remove -Xuse-k2 flag"
)
return false
}
val outputs = mutableListOf<GenerationState>()
var mainClassFqName: FqName? = null