aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar cushon <cushon@google.com>2018-08-08 14:08:37 -0700
committerGravatar Copybara-Service <copybara-piper@google.com>2018-08-08 14:09:58 -0700
commit64ed49be0d9d297a4a610af1cc05b270674e2c60 (patch)
tree496123418c7271c43c9f5606db074433042d59cd /src
parentbddc514c24e696fcc61df68eae50bc4963d0a4ad (diff)
Deprecate most of the targets in the JDK repository
See #5594 PiperOrigin-RevId: 207943203
Diffstat (limited to 'src')
-rw-r--r--src/main/tools/jdk.BUILD45
1 files changed, 33 insertions, 12 deletions
diff --git a/src/main/tools/jdk.BUILD b/src/main/tools/jdk.BUILD
index 8500c864e2..ce757ac3bc 100644
--- a/src/main/tools/jdk.BUILD
+++ b/src/main/tools/jdk.BUILD
@@ -1,64 +1,77 @@
package(default_visibility = ["//visibility:public"])
+DEPRECATION_MESSAGE = ("Don't depend on targets in the JDK workspace;" +
+ " use @bazel_tools//tools/jdk:current_java_runtime instead" +
+ " (see https://github.com/bazelbuild/bazel/issues/5594)")
+
filegroup(
name = "jni_header",
srcs = ["include/jni.h"],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
name = "jni_md_header-darwin",
srcs = ["include/darwin/jni_md.h"],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
name = "jni_md_header-linux",
srcs = ["include/linux/jni_md.h"],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
name = "jni_md_header-freebsd",
srcs = ["include/freebsd/jni_md.h"],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
name = "jni_md_header-windows",
srcs = ["include/win32/jni_md.h"],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
name = "java",
+ deprecation = DEPRECATION_MESSAGE,
srcs = select({
- ":windows" : ["bin/java.exe"],
- "//conditions:default" : ["bin/java"],
+ ":windows": ["bin/java.exe"],
+ "//conditions:default": ["bin/java"],
}),
data = [":jdk"],
)
filegroup(
name = "jar",
+ deprecation = DEPRECATION_MESSAGE,
srcs = select({
- ":windows" : ["bin/jar.exe"],
- "//conditions:default" : ["bin/jar"],
+ ":windows": ["bin/jar.exe"],
+ "//conditions:default": ["bin/jar"],
}),
data = [":jdk"],
)
filegroup(
+ deprecation = DEPRECATION_MESSAGE,
name = "javac",
srcs = select({
- ":windows" : ["bin/javac.exe"],
- "//conditions:default" : ["bin/javac"],
+ ":windows": ["bin/javac.exe"],
+ "//conditions:default": ["bin/javac"],
}),
data = [":jdk"],
)
-
filegroup(
+ deprecation = DEPRECATION_MESSAGE,
name = "xjc",
srcs = ["bin/xjc"],
)
filegroup(
+ deprecation = DEPRECATION_MESSAGE,
name = "wsimport",
srcs = ["bin/wsimport"],
)
@@ -73,6 +86,7 @@ BOOTCLASS_JARS = [
# TODO(cushon): this isn't compatible with JDK 9
filegroup(
+ deprecation = DEPRECATION_MESSAGE,
name = "bootclasspath",
srcs = ["jre/lib/%s" % jar for jar in BOOTCLASS_JARS],
)
@@ -80,11 +94,13 @@ filegroup(
# TODO(cushon): migrate to extclasspath and delete
filegroup(
name = "extdir",
+ deprecation = DEPRECATION_MESSAGE,
srcs = glob(["jre/lib/ext/*.jar"]),
)
filegroup(
name = "extclasspath",
+ deprecation = DEPRECATION_MESSAGE,
srcs = glob(["jre/lib/ext/*.jar"]),
)
@@ -94,9 +110,10 @@ filegroup(
# In some configurations, Java browser plugin is considered harmful and
# common antivirus software blocks access to npjp2.dll interfering with Bazel,
# so do not include it in JRE on Windows.
- ":windows" : glob(["jre/bin/**"], exclude = ["jre/bin/plugin2/**"]),
- "//conditions:default" : glob(["jre/bin/**"])
+ ":windows": glob(["jre/bin/**"], exclude = ["jre/bin/plugin2/**"]),
+ "//conditions:default": glob(["jre/bin/**"]),
}),
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
@@ -115,6 +132,7 @@ filegroup(
":jre-bin",
":jre-lib",
],
+ deprecation = DEPRECATION_MESSAGE,
)
filegroup(
@@ -123,7 +141,8 @@ filegroup(
["bin/**"],
# The JDK on Windows sometimes contains a directory called
# "%systemroot%", which is not a valid label.
- exclude = ["**/*%*/**"]),
+ exclude = ["**/*%*/**"],
+ ),
)
filegroup(
@@ -138,7 +157,8 @@ filegroup(
exclude = [
"lib/missioncontrol/**",
"lib/visualvm/**",
- ]),
+ ],
+ ),
)
java_runtime(
@@ -154,12 +174,14 @@ java_runtime(
filegroup(
name = "langtools",
srcs = ["lib/tools.jar"],
+ deprecation = DEPRECATION_MESSAGE,
)
java_import(
name = "langtools-neverlink",
jars = ["lib/tools.jar"],
neverlink = 1,
+ deprecation = DEPRECATION_MESSAGE,
)
config_setting(
@@ -167,4 +189,3 @@ config_setting(
values = {"cpu": "x64_windows"},
visibility = ["//visibility:private"],
)
-