diff --git a/docs/kotlin.md b/docs/kotlin.md
index f98c1e6be..446674080 100755
--- a/docs/kotlin.md
+++ b/docs/kotlin.md
@@ -402,7 +402,8 @@ kt_kotlinc_options(name, x_inline_classes, x_jvm_default, x_lambdas, x_multi_platform, x_no_call_assertions,
x_no_optimize, x_no_optimized_callable_references, x_no_param_assertions,
x_no_receiver_assertions, x_no_source_debug_extension, x_optin, x_report_perf,
- x_sam_conversions, x_skip_prerelease_check, x_use_fir_lt, x_use_k2)
+ x_sam_conversions, x_skip_prerelease_check, x_suppress_version_warnings,
+ x_use_fir_lt, x_use_k2)
Define kotlin compiler options.
@@ -438,6 +439,7 @@ kt_kotlinc_options(name, x_report_perf | Report detailed performance statistics | Boolean | optional | False |
|x_sam_conversions | Change codegen behavior of SAM/functional interfaces | String | optional | "class" |
|x_skip_prerelease_check | Suppress errors thrown when using pre-release classes. | Boolean | optional | False |
+|x_suppress_version_warnings | Suppress warnings about outdated, inconsistent, or experimental language or API versions. | Boolean | optional | False |
|x_use_fir_lt | Compile using LightTree parser with Front-end IR. Warning: this feature is far from being production-ready | Boolean | optional | False |
|x_use_k2 | Compile using experimental K2. K2 is a new compiler pipeline, no compatibility guarantees are yet provided | Boolean | optional | False |
diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl
index b600c028a..9b15fb8ea 100644
--- a/src/main/starlark/core/options/opts.kotlinc.bzl
+++ b/src/main/starlark/core/options/opts.kotlinc.bzl
@@ -77,6 +77,17 @@ _KOPTS_ALL = {
True: ["-Xcontext-receivers"],
},
),
+ "x_suppress_version_warnings": struct(
+ flag = "-Xsuppress-version-warnings",
+ args = dict(
+ default = False,
+ doc = "Suppress warnings about outdated, inconsistent, or experimental language or API versions.",
+ ),
+ type = attr.bool,
+ value_to_flag = {
+ True: ["-Xsuppress-version-warnings"],
+ },
+ ),
"x_inline_classes": struct(
flag = "-Xinline-classes",
args = dict(