File tree Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Expand file tree Collapse file tree 2 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ _implicit_deps = {
148
148
"_kt_toolchain" : attr .label (
149
149
doc = """The Kotlin toolchain. it's only purpose is to enable the Intellij
150
150
to discover Kotlin language version""" ,
151
- default = Label ("//kotlin/internal:default_toolchain_impl " ),
151
+ default = Label ("//kotlin/internal:current_toolchain " ),
152
152
cfg = "target" ,
153
153
),
154
154
"_java_toolchain" : attr .label (
Original file line number Diff line number Diff line change @@ -342,6 +342,18 @@ def define_kt_toolchain(
342
342
target_settings = target_settings or [],
343
343
)
344
344
345
+ def _kt_toolchain_alias_impl (ctx ):
346
+ toolchain_info = ctx .toolchains [_TOOLCHAIN_TYPE ]
347
+
348
+ return [
349
+ toolchain_info ,
350
+ ]
351
+
352
+ _kt_toolchain_alias = rule (
353
+ implementation = _kt_toolchain_alias_impl ,
354
+ toolchains = [_TOOLCHAIN_TYPE ],
355
+ )
356
+
345
357
def kt_configure_toolchains ():
346
358
"""
347
359
Defines the toolchain_type and default toolchain for kotlin compilation.
@@ -398,3 +410,8 @@ def kt_configure_toolchains():
398
410
define_kt_toolchain (
399
411
name = "default_toolchain" ,
400
412
)
413
+
414
+ _kt_toolchain_alias (
415
+ name = "current_toolchain" ,
416
+ visibility = ["//visibility:public" ],
417
+ )
You can’t perform that action at this time.
0 commit comments