Add cli argumens for FIR "tight" IC and LightTree usage

This commit is contained in:
Ilya Chernikov
2022-01-10 16:23:38 +01:00
committed by teamcity
parent 9e32188938
commit a239f02a30
5 changed files with 18 additions and 2 deletions
@@ -305,6 +305,18 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
)
var useFirExtendedCheckers: Boolean by FreezableVar(false)
@Argument(
value = "-Xuse-fir-ic",
description = "Compile using Front-end IR internal incremental compilation cycle. Warning: this feature is far from being production-ready"
)
var useFirIC: Boolean by FreezableVar(false)
@Argument(
value = "-Xuse-fir-lt",
description = "Compile using LightTree parser with Front-end IR. Warning: this feature is far from being production-ready"
)
var useFirLT: Boolean by FreezableVar(false)
@Argument(
value = "-Xdisable-ultra-light-classes",
description = "Do not use the ultra light classes implementation"
@@ -124,7 +124,7 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
val chunk = moduleChunk.modules
configuration.configureSourceRoots(chunk, buildFile)
if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR)) {
if (configuration.getBoolean(CommonConfigurationKeys.USE_FIR) && arguments.useFirLT /* TODO: consider storing in the configuration instead of using args here directly */) {
val projectEnvironment =
createProjectEnvironment(configuration, rootDisposable, EnvironmentConfigFiles.JVM_CONFIG_FILES, messageCollector)