Skip to content

Commit

Permalink
Support -Xsuppress-version-warnings (#1146)
Browse files Browse the repository at this point in the history
* Support -Xsuppress-version-warnings

* Fix

* Docs update

---------

Co-authored-by: Corbin McNeely-Smith <58151731+restingbull@users.noreply.github.com>
  • Loading branch information
Bencodes and restingbull committed Mar 27, 2024
1 parent 973e16d commit f5b65cc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
4 changes: 3 additions & 1 deletion docs/kotlin.md
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,8 @@ kt_kotlinc_options(<a href="#kt_kotlinc_options-name">name</a>, <a href="#kt_kot
<a href="#kt_kotlinc_options-x_inline_classes">x_inline_classes</a>, <a href="#kt_kotlinc_options-x_jvm_default">x_jvm_default</a>, <a href="#kt_kotlinc_options-x_lambdas">x_lambdas</a>, <a href="#kt_kotlinc_options-x_multi_platform">x_multi_platform</a>, <a href="#kt_kotlinc_options-x_no_call_assertions">x_no_call_assertions</a>,
<a href="#kt_kotlinc_options-x_no_optimize">x_no_optimize</a>, <a href="#kt_kotlinc_options-x_no_optimized_callable_references">x_no_optimized_callable_references</a>, <a href="#kt_kotlinc_options-x_no_param_assertions">x_no_param_assertions</a>,
<a href="#kt_kotlinc_options-x_no_receiver_assertions">x_no_receiver_assertions</a>, <a href="#kt_kotlinc_options-x_no_source_debug_extension">x_no_source_debug_extension</a>, <a href="#kt_kotlinc_options-x_optin">x_optin</a>, <a href="#kt_kotlinc_options-x_report_perf">x_report_perf</a>,
<a href="#kt_kotlinc_options-x_sam_conversions">x_sam_conversions</a>, <a href="#kt_kotlinc_options-x_skip_prerelease_check">x_skip_prerelease_check</a>, <a href="#kt_kotlinc_options-x_use_fir_lt">x_use_fir_lt</a>, <a href="#kt_kotlinc_options-x_use_k2">x_use_k2</a>)
<a href="#kt_kotlinc_options-x_sam_conversions">x_sam_conversions</a>, <a href="#kt_kotlinc_options-x_skip_prerelease_check">x_skip_prerelease_check</a>, <a href="#kt_kotlinc_options-x_suppress_version_warnings">x_suppress_version_warnings</a>,
<a href="#kt_kotlinc_options-x_use_fir_lt">x_use_fir_lt</a>, <a href="#kt_kotlinc_options-x_use_k2">x_use_k2</a>)

Define kotlin compiler options.
Expand Down Expand Up @@ -438,6 +439,7 @@ kt_kotlinc_options(<a href="#kt_kotlinc_options-name">name</a>, <a href="#kt_kot
|<a id="kt_kotlinc_options-x_report_perf"></a>x_report_perf | Report detailed performance statistics | Boolean | optional | False |
|<a id="kt_kotlinc_options-x_sam_conversions"></a>x_sam_conversions | Change codegen behavior of SAM/functional interfaces | String | optional | "class" |
|<a id="kt_kotlinc_options-x_skip_prerelease_check"></a>x_skip_prerelease_check | Suppress errors thrown when using pre-release classes. | Boolean | optional | False |
|<a id="kt_kotlinc_options-x_suppress_version_warnings"></a>x_suppress_version_warnings | Suppress warnings about outdated, inconsistent, or experimental language or API versions. | Boolean | optional | False |
|<a id="kt_kotlinc_options-x_use_fir_lt"></a>x_use_fir_lt | Compile using LightTree parser with Front-end IR. Warning: this feature is far from being production-ready | Boolean | optional | False |
|<a id="kt_kotlinc_options-x_use_k2"></a>x_use_k2 | Compile using experimental K2. K2 is a new compiler pipeline, no compatibility guarantees are yet provided | Boolean | optional | False |

Expand Down
11 changes: 11 additions & 0 deletions src/main/starlark/core/options/opts.kotlinc.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit f5b65cc

Please sign in to comment.