Skip to content

Commit

Permalink
Add kt_abi_plugin_incompatible tag to opt-out incompatible targets
Browse files Browse the repository at this point in the history
from ABI strategy falling back to building just runtime jars.
  • Loading branch information
jongerrish committed Nov 18, 2020
1 parent 269a928 commit 3f9553b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
2 changes: 1 addition & 1 deletion kotlin/internal/jvm/compile.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ def _run_kt_java_builder_actions(ctx, rule_kind, toolchains, srcs, generated_src
# Build Kotlin
if srcs.kt or srcs.src_jars:
kt_runtime_jar = ctx.actions.declare_file(ctx.label.name + "-kt.jar")
if toolchains.kt.experimental_use_abi_jars:
if toolchains.kt.experimental_use_abi_jars and not "kt_abi_plugin_incompatible" in ctx.attr.tags:
kt_compile_jar = ctx.actions.declare_file(ctx.label.name + "-kt.abi.jar")
outputs = {
"output": kt_runtime_jar,
Expand Down
7 changes: 2 additions & 5 deletions kotlin/internal/toolchains.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -171,11 +171,8 @@ _kt_toolchain = rule(
providers = [_KtJsInfo],
),
"experimental_use_abi_jars": attr.bool(
doc = "Compile using abi jars, requires experimental_use_java_builder",
default = False,
),
"experimental_use_java_builder" : attr.bool(
doc="Use Bazel JavaBuilder for Java source",
doc = """Compile using abi jars, requires experimental_use_java_builder. Can be disabled
for an individual target using the tag `kt_abi_plugin_incompatible`""",
default = False,
),
"experimental_use_java_builder" : attr.bool(
Expand Down

0 comments on commit 3f9553b

Please sign in to comment.