aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar cushon <cushon@google.com>2017-12-20 16:19:56 -0800
committerGravatar Copybara-Service <copybara-piper@google.com>2017-12-20 16:21:55 -0800
commit29a96822a3bc5a81094285a995d905a074ef5714 (patch)
tree50cee37e705218b1e0ee3f86826e4530081c54e2 /src
parentdb319f8eca064475d5092a756c75f2c3f6526b7e (diff)
Update bootclasspath handling for JDK 9
rt.jar etc. no longer exist, retrieve the default bootclasspath contents using a Java program instead. PiperOrigin-RevId: 179747945
Diffstat (limited to 'src')
-rw-r--r--src/java_tools/buildjar/BUILD9
-rw-r--r--src/main/tools/jdk.BUILD1
-rw-r--r--src/test/shell/bazel/BUILD2
3 files changed, 8 insertions, 4 deletions
diff --git a/src/java_tools/buildjar/BUILD b/src/java_tools/buildjar/BUILD
index 0d11de9bd0..ca8d4eb3b4 100644
--- a/src/java_tools/buildjar/BUILD
+++ b/src/java_tools/buildjar/BUILD
@@ -59,11 +59,16 @@ java_library(
],
)
+# This toolchain is used to bootstrap Bazel.
java_toolchain(
name = "bootstrap_toolchain",
- bootclasspath = ["//tools/jdk:bootclasspath"],
+ # javac -extdirs is implemented by appending the contents to the platform
+ # class path after -bootclasspath. For convenience, we currently have a
+ # single jar that contains the contents of both the bootclasspath and
+ # extdirs.
+ bootclasspath = ["//tools/jdk:platformclasspath-impl.jar"],
encoding = "UTF-8",
- extclasspath = ["//tools/jdk:extclasspath"],
+ extclasspath = [],
genclass = ["bootstrap_genclass_deploy.jar"],
ijar = ["//third_party/ijar"],
javabuilder = ["bootstrap_deploy.jar"],
diff --git a/src/main/tools/jdk.BUILD b/src/main/tools/jdk.BUILD
index ac7a6bbf29..6726e0424f 100644
--- a/src/main/tools/jdk.BUILD
+++ b/src/main/tools/jdk.BUILD
@@ -77,6 +77,7 @@ BOOTCLASS_JARS = [
"charsets.jar",
]
+# TODO(cushon): this isn't compatible with JDK 9
filegroup(
name = "bootclasspath",
srcs = ["jre/lib/%s" % jar for jar in BOOTCLASS_JARS],
diff --git a/src/test/shell/bazel/BUILD b/src/test/shell/bazel/BUILD
index 7cc1f6fe4b..f67c4b2123 100644
--- a/src/test/shell/bazel/BUILD
+++ b/src/test/shell/bazel/BUILD
@@ -40,8 +40,6 @@ filegroup(
"//third_party/java/jdk/langtools:test-srcs",
"//tools:srcs",
"@local_jdk//:bootclasspath",
- # TODO(cushon): migrate to extclasspath and delete
- "@local_jdk//:extdir",
"@local_jdk//:jdk",
] + select({
# TODO(bazel-team): Once https://github.com/bazelbuild/bazel/issues/2241