diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt index 30e92def195..ed3e113ffb2 100644 --- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt +++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt @@ -212,13 +212,20 @@ fun CompilerConfiguration.configureAdvancedJvmOptions(arguments: K2JVMCompilerAr arguments.useIR && !useOldBackend } - if (arguments.useIR && arguments.useOldBackend) { + if (arguments.useOldBackend) { messageCollector.report( STRONG_WARNING, - "Both -Xuse-ir and -Xuse-old-backend are passed. This is an inconsistent configuration. " + - "The compiler will use the ${if (useIR) "JVM IR" else "old JVM"} backend" + "-Xuse-old-backend is deprecated and will be removed in a future release" ) + if (arguments.useIR) { + messageCollector.report( + STRONG_WARNING, + "Both -Xuse-ir and -Xuse-old-backend are passed. This is an inconsistent configuration. " + + "The compiler will use the ${if (useIR) "JVM IR" else "old JVM"} backend" + ) + } } + messageCollector.report(LOGGING, "Using ${if (useIR) "JVM IR" else "old JVM"} backend") put(JVMConfigurationKeys.IR, useIR) diff --git a/compiler/testData/cli/jvm/abiStabilityUnstableWithOldBackend.out b/compiler/testData/cli/jvm/abiStabilityUnstableWithOldBackend.out index 4383a3f6de4..6a1292baf11 100644 --- a/compiler/testData/cli/jvm/abiStabilityUnstableWithOldBackend.out +++ b/compiler/testData/cli/jvm/abiStabilityUnstableWithOldBackend.out @@ -1,2 +1,3 @@ +warning: -Xuse-old-backend is deprecated and will be removed in a future release error: -Xabi-stability=unstable is not supported in the old JVM backend COMPILATION_ERROR diff --git a/compiler/testData/cli/jvm/bothJvmIrAndOldBackend.out b/compiler/testData/cli/jvm/bothJvmIrAndOldBackend.out index c0cc8259fe5..8e54cf0ad1c 100644 --- a/compiler/testData/cli/jvm/bothJvmIrAndOldBackend.out +++ b/compiler/testData/cli/jvm/bothJvmIrAndOldBackend.out @@ -1,2 +1,3 @@ +warning: -Xuse-old-backend is deprecated and will be removed in a future release warning: both -Xuse-ir and -Xuse-old-backend are passed. This is an inconsistent configuration. The compiler will use the old JVM backend OK diff --git a/compiler/testData/cli/jvm/classAndTraitClash.out b/compiler/testData/cli/jvm/classAndTraitClash.out index fc19dc1ab5d..6b3c2f4465f 100644 --- a/compiler/testData/cli/jvm/classAndTraitClash.out +++ b/compiler/testData/cli/jvm/classAndTraitClash.out @@ -1,3 +1,4 @@ +warning: -Xuse-old-backend is deprecated and will be removed in a future release compiler/testData/cli/jvm/classAndTraitClash.kt:3:1: error: duplicate JVM class name 'test/T1$DefaultImpls' generated from: `T1$DefaultImpls`, T1 interface T1 { ^ diff --git a/compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.out b/compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.out index 55a958d858a..991e8e311ac 100644 --- a/compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.out +++ b/compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.out @@ -1,3 +1,4 @@ +warning: -Xuse-old-backend is deprecated and will be removed in a future release compiler/testData/cli/jvm/suspendInFunInterfaceIrDisabled.kt:2:5: error: 'suspend' modifier is not allowed on a single abstract member suspend fun foo() ^