mirror of
https://github.com/github/codeql.git
synced 2026-03-06 15:49:08 +01:00
33 lines
1.0 KiB
Diff
33 lines
1.0 KiB
Diff
diff --git a/src/main/starlark/core/options/opts.kotlinc.bzl b/src/main/starlark/core/options/opts.kotlinc.bzl
|
|
index 9b15fb8..c0ac2cd 100644
|
|
--- a/src/main/starlark/core/options/opts.kotlinc.bzl
|
|
+++ b/src/main/starlark/core/options/opts.kotlinc.bzl
|
|
@@ -28,6 +28,11 @@ def _map_jvm_target_to_flag(version):
|
|
return None
|
|
return ["-jvm-target=%s" % version]
|
|
|
|
+def _map_language_version_to_flag(version):
|
|
+ if not version:
|
|
+ return None
|
|
+ return ["-language-version=%s" % version, "-api-version=%s" % version]
|
|
+
|
|
_KOPTS_ALL = {
|
|
"warn": struct(
|
|
args = dict(
|
|
@@ -349,6 +354,15 @@ _KOPTS_ALL = {
|
|
value_to_flag = None,
|
|
map_value_to_flag = _map_jvm_target_to_flag,
|
|
),
|
|
+ "language_version": struct(
|
|
+ args = dict(
|
|
+ default = "1.9",
|
|
+ doc = "-language-version",
|
|
+ ),
|
|
+ type = attr.string,
|
|
+ value_to_flag = None,
|
|
+ map_value_to_flag = _map_language_version_to_flag,
|
|
+ ),
|
|
}
|
|
|
|
# Filters out options that are not available in current compiler release
|