aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/jdk/BUILD
diff options
context:
space:
mode:
authorGravatar lberki <lberki@google.com>2017-12-08 03:38:07 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-08 03:39:33 -0800
commit2a9e125499c8fadb731420a1a9dfe7adc8f08792 (patch)
treed512e9b1aa0150208a2dc126fdc6a13d15db0bf8 /tools/jdk/BUILD
parentc5301e919c990ab2e87bac9abde003202c966e8a (diff)
Implement @bazel_tools//tools/jdk:current_host_java_runtime .
This is now possible because the Bazel release now supports TemplateVariableInfo. RELNOTES: None. PiperOrigin-RevId: 178360631
Diffstat (limited to 'tools/jdk/BUILD')
-rw-r--r--tools/jdk/BUILD13
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD
index 213fec7a09..d1f6f096e9 100644
--- a/tools/jdk/BUILD
+++ b/tools/jdk/BUILD
@@ -2,10 +2,12 @@ package(default_visibility = ["//visibility:public"])
# TODO(lberki): Remove this once java_toolchain_alias and java_runtime_alias are
# in a Bazel release
-load("//tools/jdk:alias_rules.bzl", "java_runtime_alias", "java_toolchain_alias")
+load("//tools/jdk:alias_rules.bzl", "java_host_runtime_alias")
java_runtime_alias(name = "current_java_runtime")
+java_host_runtime_alias(name = "current_host_java_runtime")
+
java_toolchain_alias(name = "current_java_toolchain")
config_setting(
@@ -28,6 +30,15 @@ filegroup(
}),
)
+# This is necessary to get the *host* Java runtime. Depending on
+# //tools/jdk:current_java_runtime from an attribute with the host transition
+# does not work because the dependency is determined based on the configuration
+# *before* the transition.
+alias(
+ name = "java_runtime_alias",
+ actual = "//tools/jdk:current_java_runtime",
+)
+
alias(
name = "jni_header",
actual = "@local_jdk//:jni_header",