KT-52217 Rename 'use-fir' to 'use-k2', update message
This commit is contained in:
+4
-3
@@ -294,10 +294,11 @@ abstract class CommonCompilerArguments : CommonToolArguments() {
|
||||
|
||||
@GradleOption(DefaultValues.BooleanFalseDefault::class)
|
||||
@Argument(
|
||||
value = "-Xuse-fir",
|
||||
description = "Compile using Front-end IR. Warning: this feature is far from being production-ready"
|
||||
value = "-Xuse-k2",
|
||||
deprecatedName = "-Xuse-fir",
|
||||
description = "Compile using experimental K2. K2 is a new compiler pipeline, no compatibility guarantees are yet provided"
|
||||
)
|
||||
var useFir: Boolean by FreezableVar(false)
|
||||
var useK2: Boolean by FreezableVar(false)
|
||||
|
||||
@Argument(
|
||||
value = "-Xuse-fir-extended-checkers",
|
||||
|
||||
+1
-1
@@ -528,7 +528,7 @@ Also sets `-jvm-target` value equal to the selected JDK version"""
|
||||
result[JvmAnalysisFlags.sanitizeParentheses] = sanitizeParentheses
|
||||
result[JvmAnalysisFlags.suppressMissingBuiltinsError] = suppressMissingBuiltinsError
|
||||
result[JvmAnalysisFlags.enableJvmPreview] = enableJvmPreview
|
||||
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useFir
|
||||
result[AnalysisFlags.allowUnstableDependencies] = allowUnstableDependencies || useK2
|
||||
result[JvmAnalysisFlags.disableUltraLightClasses] = disableUltraLightClasses
|
||||
result[JvmAnalysisFlags.useIR] = !useOldBackend
|
||||
return result
|
||||
|
||||
@@ -22,7 +22,7 @@ fun <A : CommonCompilerArguments> CompilerConfiguration.setupCommonArguments(
|
||||
createMetadataVersion: ((IntArray) -> BinaryVersion)? = null
|
||||
) {
|
||||
put(CommonConfigurationKeys.DISABLE_INLINE, arguments.noInline)
|
||||
put(CommonConfigurationKeys.USE_FIR, arguments.useFir)
|
||||
put(CommonConfigurationKeys.USE_FIR, arguments.useK2)
|
||||
put(CommonConfigurationKeys.USE_FIR_EXTENDED_CHECKERS, arguments.useFirExtendedCheckers)
|
||||
put(CommonConfigurationKeys.EXPECT_ACTUAL_LINKER, arguments.expectActualLinker)
|
||||
putIfNotNull(CLIConfigurationKeys.INTELLIJ_PLUGIN_ROOT, arguments.intellijPluginRoot)
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ object FirKotlinToJvmBytecodeCompiler {
|
||||
|
||||
messageCollector.report(
|
||||
STRONG_WARNING,
|
||||
"ATTENTION!\n This build uses in-dev FIR: \n -Xuse-fir"
|
||||
"ATTENTION!\n This build uses experimental K2 compiler: \n -Xuse-k2"
|
||||
)
|
||||
|
||||
projectConfiguration.get(ComponentRegistrar.PLUGIN_COMPONENT_REGISTRARS)?.let { pluginComponentRegistrars ->
|
||||
|
||||
@@ -97,7 +97,7 @@ fun compileModulesUsingFrontendIrAndLightTree(
|
||||
|
||||
messageCollector.report(
|
||||
CompilerMessageSeverity.STRONG_WARNING,
|
||||
"ATTENTION!\n This build uses in-dev FIR: \n -Xuse-fir"
|
||||
"ATTENTION!\n This build uses experimental K2 compiler: \n -Xuse-k2"
|
||||
)
|
||||
|
||||
val outputs = mutableListOf<GenerationState>()
|
||||
|
||||
@@ -230,7 +230,7 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr
|
||||
|
||||
// TODO: ignore previous configuration value when we do not need old backend in scripting by default
|
||||
val useOldBackend = arguments.useOldBackend || (!arguments.useIR && get(JVMConfigurationKeys.IR) == false)
|
||||
val useIR = arguments.useFir ||
|
||||
val useIR = arguments.useK2 ||
|
||||
if (languageVersionSettings.supportsFeature(LanguageFeature.JvmIrEnabledByDefault)) {
|
||||
!useOldBackend
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user