Add cli argumens for FIR "tight" IC and LightTree usage
This commit is contained in:
+12
@@ -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)
|
||||
|
||||
|
||||
+1
-1
@@ -87,7 +87,7 @@ fun makeIncrementally(
|
||||
|
||||
withIC(args) {
|
||||
val compiler =
|
||||
if (args.useFir)
|
||||
if (args.useFir && args.useFirIC && args.useFirLT /* TODO: move LT check into runner */ )
|
||||
IncrementalFirJvmCompilerRunner(
|
||||
cachesDir, buildReporter, buildHistoryFile, emptyList(), EmptyModulesApiHistory, kotlinExtensions, ClasspathSnapshotDisabled
|
||||
)
|
||||
|
||||
+2
@@ -103,6 +103,8 @@ where advanced options include:
|
||||
Eliminate builder inference restrictions like allowance of returning type variables of a builder inference call
|
||||
-Xuse-fir Compile using Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-extended-checkers Use extended analysis mode based on Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-ic Compile using Front-end IR internal incremental compilation cycle. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-lt Compile using LightTree parser with Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-mixed-named-arguments Enable Support named arguments in their own position even if the result appears as mixed
|
||||
-Xverbose-phases Be verbose while performing these backend phases
|
||||
|
||||
|
||||
+2
@@ -211,6 +211,8 @@ where advanced options include:
|
||||
Eliminate builder inference restrictions like allowance of returning type variables of a builder inference call
|
||||
-Xuse-fir Compile using Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-extended-checkers Use extended analysis mode based on Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-ic Compile using Front-end IR internal incremental compilation cycle. Warning: this feature is far from being production-ready
|
||||
-Xuse-fir-lt Compile using LightTree parser with Front-end IR. Warning: this feature is far from being production-ready
|
||||
-Xuse-mixed-named-arguments Enable Support named arguments in their own position even if the result appears as mixed
|
||||
-Xverbose-phases Be verbose while performing these backend phases
|
||||
|
||||
|
||||
Reference in New Issue
Block a user