mirror of
https://github.com/github/codeql.git
synced 2026-04-24 00:05:14 +02:00
Bazel: move patching of rules_kotlin to a registry override
This commit is contained in:
@@ -1,32 +0,0 @@
|
||||
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
|
||||
Reference in New Issue
Block a user