[Arguments] Add missing @Deprecated annotation for deprecated CLI arguments

KT-79403
diff --git a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/CommonCompilerArguments.kt b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/CommonCompilerArguments.kt
index f5ab585..045cb8a 100644
--- a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/CommonCompilerArguments.kt
+++ b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/CommonCompilerArguments.kt
@@ -554,6 +554,10 @@
         description = "Enable experimental frontend IR checkers that are not yet ready for production.".asReleaseDependent()
         valueType = BooleanType.defaultFalse
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v2_1_0,
             deprecatedVersion = KotlinReleaseVersion.v2_2_20,
diff --git a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/JvmCompilerArguments.kt b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/JvmCompilerArguments.kt
index aa4e62e..0d49bc5 100644
--- a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/JvmCompilerArguments.kt
+++ b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/JvmCompilerArguments.kt
@@ -558,6 +558,10 @@
         valueType = StringType.defaultNull
         valueDescription = "{all|all-compatibility|disable}".asReleaseDependent()
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated. Use `-jvm-default` instead")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v1_2_50,
             deprecatedVersion = KotlinReleaseVersion.v2_2_0,
@@ -867,6 +871,10 @@
 It has no effect when -language-version is 2.0 or higher.""".asReleaseDependent()
         valueType = BooleanType.defaultFalse
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v1_7_0,
             deprecatedVersion = KotlinReleaseVersion.v2_0_0,
diff --git a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/NativeCompilerArguments.kt b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/NativeCompilerArguments.kt
index fe62154..f50fc3b 100644
--- a/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/NativeCompilerArguments.kt
+++ b/compiler/arguments/src/org/jetbrains/kotlin/arguments/description/NativeCompilerArguments.kt
@@ -117,6 +117,10 @@
         valueType = StringType.defaultNull
         valueDescription = "<version>".asReleaseDependent()
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v1_5_20,
             stabilizedVersion = KotlinReleaseVersion.v1_5_20,
@@ -216,6 +220,10 @@
         description = "Don't link endorsed libraries from the dist automatically. This option has been deprecated, as the dist no longer has any endorsed libraries.".asReleaseDependent()
         valueType = BooleanType.defaultFalse
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v1_5_20,
             stabilizedVersion = KotlinReleaseVersion.v1_5_20,
@@ -520,6 +528,10 @@
         description = "Add light debug information. This option has been deprecated. Please use '-Xadd-light-debug=enable' instead.".asReleaseDependent()
         valueType = BooleanType.defaultFalse
 
+        additionalAnnotations(
+            Deprecated("This flag is deprecated")
+        )
+
         lifecycle(
             introducedVersion = KotlinReleaseVersion.v1_5_20,
             deprecatedVersion = KotlinReleaseVersion.v1_5_20,
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt
index de2975a..3336a48 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArguments.kt
@@ -464,6 +464,7 @@
             field = value
         }
 
+    @Deprecated("This flag is deprecated")
     @Argument(
         value = "-Xuse-fir-experimental-checkers",
         description = "Enable experimental frontend IR checkers that are not yet ready for production.",
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt
index c0d1d69..c9dc76f 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/CommonCompilerArgumentsCopyGenerated.kt
@@ -87,6 +87,7 @@
     to.suppressVersionWarnings = from.suppressVersionWarnings
     to.suppressedDiagnostics = from.suppressedDiagnostics?.copyOf()
     to.unrestrictedBuilderInference = from.unrestrictedBuilderInference
+    @Suppress("DEPRECATION")
     to.useFirExperimentalCheckers = from.useFirExperimentalCheckers
     to.useFirIC = from.useFirIC
     to.useFirLT = from.useFirLT
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt
index f8962d2..e80fe6a 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArguments.kt
@@ -465,6 +465,7 @@
             field = if (value.isNullOrEmpty()) null else value
         }
 
+    @Deprecated("This flag is deprecated. Use `-jvm-default` instead")
     @Argument(
         value = "-Xjvm-default",
         valueDescription = "{all|all-compatibility|disable}",
@@ -763,6 +764,7 @@
             field = value
         }
 
+    @Deprecated("This flag is deprecated")
     @Argument(
         value = "-Xlink-via-signatures",
         description = """Link JVM IR symbols via signatures instead of descriptors.
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsCopyGenerated.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsCopyGenerated.kt
index 79bd1d1..ed03ab7 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsCopyGenerated.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsCopyGenerated.kt
@@ -44,12 +44,14 @@
     to.jdkRelease = from.jdkRelease
     to.jspecifyAnnotations = from.jspecifyAnnotations
     to.jsr305 = from.jsr305?.copyOf()
+    @Suppress("DEPRECATION")
     to.jvmDefault = from.jvmDefault
     to.jvmDefaultStable = from.jvmDefaultStable
     to.jvmExposeBoxed = from.jvmExposeBoxed
     to.jvmTarget = from.jvmTarget
     to.klibLibraries = from.klibLibraries
     to.lambdas = from.lambdas
+    @Suppress("DEPRECATION")
     to.linkViaSignatures = from.linkViaSignatures
     to.moduleName = from.moduleName
     to.noCallAssertions = from.noCallAssertions
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArguments.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArguments.kt
index 3a16d5b..0d3499e 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArguments.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArguments.kt
@@ -93,6 +93,7 @@
             field = value
         }
 
+    @Deprecated("This flag is deprecated")
     @Argument(
         value = "-library-version",
         shortName = "-lv",
@@ -176,6 +177,7 @@
             field = value
         }
 
+    @Deprecated("This flag is deprecated")
     @Argument(
         value = "-no-endorsed-libs",
         description = "Don't link endorsed libraries from the dist automatically. This option has been deprecated, as the dist no longer has any endorsed libraries.",
@@ -451,6 +453,7 @@
             field = if (value.isNullOrEmpty()) null else value
         }
 
+    @Deprecated("This flag is deprecated")
     @Argument(
         value = "-Xg0",
         description = "Add light debug information. This option has been deprecated. Please use '-Xadd-light-debug=enable' instead.",
diff --git a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArgumentsCopyGenerated.kt b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArgumentsCopyGenerated.kt
index 640f76b..ab0dc16 100644
--- a/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArgumentsCopyGenerated.kt
+++ b/compiler/cli/cli-common/gen/org/jetbrains/kotlin/cli/common/arguments/K2NativeCompilerArgumentsCopyGenerated.kt
@@ -48,7 +48,9 @@
     to.lazyIrForCaches = from.lazyIrForCaches
     to.libraries = from.libraries?.copyOf()
     to.libraryToAddToCache = from.libraryToAddToCache
+    @Suppress("DEPRECATION")
     to.libraryVersion = from.libraryVersion
+    @Suppress("DEPRECATION")
     to.lightDebugDeprecated = from.lightDebugDeprecated
     to.lightDebugString = from.lightDebugString
     to.linkerArguments = from.linkerArguments?.copyOf()
@@ -65,6 +67,7 @@
     to.nativeLibraries = from.nativeLibraries?.copyOf()
     to.noObjcGenerics = from.noObjcGenerics
     to.nodefaultlibs = from.nodefaultlibs
+    @Suppress("DEPRECATION")
     to.noendorsedlibs = from.noendorsedlibs
     to.nomain = from.nomain
     to.nopack = from.nopack
diff --git a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsConfigurator.kt b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsConfigurator.kt
index e385561..779c8d0 100644
--- a/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsConfigurator.kt
+++ b/compiler/cli/cli-common/src/org/jetbrains/kotlin/cli/common/arguments/K2JVMCompilerArgumentsConfigurator.kt
@@ -40,6 +40,7 @@
         return result
     }
 
+    @Suppress("DEPRECATION")
     private fun K2JVMCompilerArguments.configureJvmDefaultMode(collector: MessageCollector?): JvmDefaultMode? = when {
         jvmDefaultStable != null -> JvmDefaultMode.fromStringOrNull(jvmDefaultStable).also {
             if (it == null) {
diff --git a/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt b/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt
index edb6e5b..cedea99 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/common/arguments.kt
@@ -57,6 +57,7 @@
         }
     }
 
+    @Suppress("DEPRECATION")
     if (arguments.useFirExperimentalCheckers) {
         put(CommonConfigurationKeys.USE_FIR_EXPERIMENTAL_CHECKERS, true)
         messageCollector.report(
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 2c7f535..6edc249 100644
--- a/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt
+++ b/compiler/cli/src/org/jetbrains/kotlin/cli/jvm/jvmArguments.kt
@@ -303,6 +303,7 @@
 
     put(JVMConfigurationKeys.VALIDATE_BYTECODE, arguments.validateBytecode)
 
+    @Suppress("DEPRECATION")
     put(JVMConfigurationKeys.LINK_VIA_SIGNATURES, arguments.linkViaSignatures)
 
     put(JVMConfigurationKeys.ENABLE_DEBUG_MODE, arguments.enableDebugMode)
diff --git a/compiler/fir/modularized-tests/tests/org/jetbrains/kotlin/fir/AbstractFullPipelineModularizedTest.kt b/compiler/fir/modularized-tests/tests/org/jetbrains/kotlin/fir/AbstractFullPipelineModularizedTest.kt
index 3ca65a1..557e639 100644
--- a/compiler/fir/modularized-tests/tests/org/jetbrains/kotlin/fir/AbstractFullPipelineModularizedTest.kt
+++ b/compiler/fir/modularized-tests/tests/org/jetbrains/kotlin/fir/AbstractFullPipelineModularizedTest.kt
@@ -146,6 +146,7 @@
             args.jsr305 = originalArguments.jsr305
             args.nullabilityAnnotations = originalArguments.nullabilityAnnotations
             args.jspecifyAnnotations = originalArguments.jspecifyAnnotations
+            @Suppress("DEPRECATION")
             args.jvmDefault = originalArguments.jvmDefault
             args.jdkRelease = originalArguments.jdkRelease
             args.progressiveMode = originalArguments.progressiveMode
diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/SetupConfiguration.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/SetupConfiguration.kt
index 2c2df38..537dcec 100644
--- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/SetupConfiguration.kt
+++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/SetupConfiguration.kt
@@ -35,6 +35,7 @@
     arguments.kotlinHome?.let { put(KONAN_HOME, it) }
 
     put(NODEFAULTLIBS, arguments.nodefaultlibs || !arguments.libraryToAddToCache.isNullOrEmpty())
+    @Suppress("DEPRECATION")
     put(NOENDORSEDLIBS, arguments.noendorsedlibs || !arguments.libraryToAddToCache.isNullOrEmpty())
     put(NOSTDLIB, arguments.nostdlib || !arguments.libraryToAddToCache.isNullOrEmpty())
     put(NOPACK, arguments.nopack)
@@ -76,6 +77,7 @@
     put(OPTIMIZATION, arguments.optimization)
     put(DEBUG, arguments.debug)
     // TODO: remove after 1.4 release.
+    @Suppress("DEPRECATION")
     if (arguments.lightDebugDeprecated) {
         report(WARNING,
                 "-Xg0 is now deprecated and skipped by compiler. Light debug information is enabled by default for Darwin platforms." +
diff --git a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/JvmDefaultIT.kt b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/JvmDefaultIT.kt
index 5c73232..c6dfd97 100644
--- a/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/JvmDefaultIT.kt
+++ b/libraries/tools/kotlin-gradle-plugin-integration-tests/src/test/kotlin/org/jetbrains/kotlin/gradle/JvmDefaultIT.kt
@@ -224,6 +224,7 @@
         }.buildAndReturn(":compileKotlin", buildAction = BuildActions.buildWithAssertions(buildOutputAssertions))
 
         assertEquals(expectedJvmDefaultStable, jvmArgs.jvmDefaultStable)
+        @Suppress("DEPRECATION")
         assertEquals(expectedJvmDefaultDeprecated, jvmArgs.jvmDefault)
     }
-}
\ No newline at end of file
+}
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
index 240c0a5..f8c84d6 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeLink.kt
@@ -285,6 +285,7 @@
             args.target = konanTarget.name
             args.produce = outputKind.name.toLowerCaseAsciiOnly()
             args.multiPlatform = true
+            @Suppress("DEPRECATION")
             args.noendorsedlibs = true
             args.nostdlib = true
             args.exportKDoc = exportKdoc.get()
diff --git a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt
index 96ade18..ea17dc5 100644
--- a/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt
+++ b/libraries/tools/kotlin-gradle-plugin/src/common/kotlin/org/jetbrains/kotlin/gradle/targets/native/tasks/KotlinNativeTasks.kt
@@ -464,6 +464,7 @@
             args.moduleName = compilerOptions.moduleName.get()
             args.shortModuleName = shortModuleName
             args.multiPlatform = true
+            @Suppress("DEPRECATION")
             args.noendorsedlibs = true
             args.outputName = outputFile.get().absolutePath
             args.optimization = optimized