diff options
author | cushon <cushon@google.com> | 2018-08-08 08:42:10 -0700 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-08-08 08:43:53 -0700 |
commit | c56699db5f9173739ba3ac55aa9fa69b6457a99b (patch) | |
tree | 3590eebf1ccbd1c0235cf5bc81bd9493fab04b54 /tools/jdk/BUILD | |
parent | 366da4cf27b7f957ef39f89206db77fa2ac289df (diff) |
'DumpPlatformClasspath' now dumps the current JDK's default platform classpath
instead of indirecting through javac's bootclasspath handling and attempting
to pin to a particular source version. This is a stop-gap until we can just
use javac's --release flag.
Using the output of DumpPlatformClasspath as the bootclasspath for the default
java_toolchain side-steps issues with @local_jdk (see #5744, #5594).
PiperOrigin-RevId: 207890272
Diffstat (limited to 'tools/jdk/BUILD')
-rw-r--r-- | tools/jdk/BUILD | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/tools/jdk/BUILD b/tools/jdk/BUILD index 8ed37dec6a..d2463827aa 100644 --- a/tools/jdk/BUILD +++ b/tools/jdk/BUILD @@ -169,29 +169,20 @@ alias( ) genrule( - name = "gen_platformclasspath", + name = "platformclasspath", srcs = ["DumpPlatformClassPath.java"], - outs = ["platformclasspath-impl.jar"], + outs = ["platformclasspath.jar"], cmd = """ set -eu TMPDIR=$$(mktemp -d -t tmp.XXXXXXXX) $(JAVABASE)/bin/javac $< -d $$TMPDIR -$(JAVA) -cp $$TMPDIR DumpPlatformClassPath 8 $@ +$(JAVA) -cp $$TMPDIR DumpPlatformClassPath $@ rm -rf $$TMPDIR """, toolchains = ["@bazel_tools//tools/jdk:current_host_java_runtime"], tools = ["@bazel_tools//tools/jdk:current_host_java_runtime"], ) -# run ijar separately so we can skip it for bootstrapping -genrule( - name = "platformclasspath", - srcs = ["platformclasspath-impl.jar"], - outs = ["platformclasspath.jar"], - cmd = "$(location @bazel_tools//tools/jdk:ijar) $< $@", - tools = ["@bazel_tools//tools/jdk:ijar"], -) - default_java_toolchain( name = "toolchain_hostjdk8", bootclasspath = [":platformclasspath"], @@ -204,8 +195,7 @@ default_java_toolchain( default_java_toolchain( name = "toolchain", - bootclasspath = [":bootclasspath"], - extclasspath = [":extclasspath"], + bootclasspath = [":platformclasspath"], source_version = "8", target_version = "8", ) |