Skip to content

Commit

Permalink
RELNOTES: Add --incompatible_use_jdk11_as_host_javabase: makes JDK 11…
Browse files Browse the repository at this point in the history
… the default --host_javabase for remote jdk (#7219)

PiperOrigin-RevId: 230592277
  • Loading branch information
cushon authored and Copybara-Service committed Jan 23, 2019
1 parent bb13c9f commit f34ad0e
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 4 deletions.
13 changes: 11 additions & 2 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,10 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz",
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip",
"jdk10-server-release-1804.tar.xz",
"java_tools_pkg-0.1.tar.gz"
"java_tools_pkg-0.1.tar.gz",
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
"zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz",
"zulu11.2.3-jdk11.0.1-win_x64.zip",
],
dirname = "jdk_WORKSPACE/distdir",
sha256 = {
Expand All @@ -290,6 +293,9 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" : "c39e7700a8d41794d60985df5a20352435196e78ecbc6a2b30df7be8637bffd5",
"jdk10-server-release-1804.tar.xz" : "b7098b7aaf6ee1ffd4a2d0371a0be26c5a5c87f6aebbe46fe9a92c90583a84be",
"java_tools_pkg-0.1.tar.gz": "df33ddb3054f0ee70389368bd1dc2efe72eeb1f489dbcdf948f3f3b3058646b7",
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": "232b1c3511f0d26e92582b7c3cc363be7ac633e371854ca2f2e9f2b50eb72a75",
"zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz": "1edf366ee821e5db8e348152fcb337b28dfd6bf0f97943c270dcc6747cedb6cb",
"zulu11.2.3-jdk11.0.1-win_x64.zip": "8e1e2b8347de6746f3fd1538840dd643201533ab113abc4ed93678e342d28aa3",
},
urls = {
"zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu-9.0.7.1-jdk9.0.7/zulu9.0.7.1-jdk9.0.7-linux_x64-allmodules.tar.gz"],
Expand All @@ -300,7 +306,10 @@ distdir_tar(
"zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz" : ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-macosx_x64-allmodules.tar.gz"],
"zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" : ["https://mirror.bazel.build/openjdk/azul-zulu10.2+3-jdk10.0.1/zulu10.2+3-jdk10.0.1-win_x64-allmodules.zip" ],
"jdk10-server-release-1804.tar.xz" : ["https://mirror.bazel.build/openjdk.linaro.org/releases/jdk10-server-release-1804.tar.xz"],
"java_tools_pkg-0.1.tar.gz": ["https://mirror.bazel.build/bazel_java_tools/java_tools_pkg-0.1.tar.gz"]
"java_tools_pkg-0.1.tar.gz": ["https://mirror.bazel.build/bazel_java_tools/java_tools_pkg-0.1.tar.gz"],
"zulu11.2.3-jdk11.0.1-linux_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz"],
"zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz": ["https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz"],
"zulu11.2.3-jdk11.0.1-win_x64.zip": ["https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-win_x64.zip"],
},
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,37 @@ http_archive(
strip_prefix = "jdk10-server-release-1804",
)


http_archive(
name = "remotejdk11_linux",
build_file = "@local_jdk//:BUILD.bazel",
sha256 = "232b1c3511f0d26e92582b7c3cc363be7ac633e371854ca2f2e9f2b50eb72a75",
strip_prefix = "zulu11.2.3-jdk11.0.1-linux_x64",
urls = [
"https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-linux_x64.tar.gz",
],
)

http_archive(
name = "remotejdk11_macos",
build_file = "@local_jdk//:BUILD.bazel",
sha256 = "1edf366ee821e5db8e348152fcb337b28dfd6bf0f97943c270dcc6747cedb6cb",
strip_prefix = "zulu11.2.3-jdk11.0.1-macosx_x64",
urls = [
"https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-macosx_x64.tar.gz",
],
)

http_archive(
name = "remotejdk11_win",
build_file = "@local_jdk//:BUILD.bazel",
sha256 = "8e1e2b8347de6746f3fd1538840dd643201533ab113abc4ed93678e342d28aa3",
strip_prefix = "zulu11.2.3-jdk11.0.1-win_x64",
urls = [
"https://mirror.bazel.build/openjdk/azul-zulu11.2.3-jdk11.0.1/zulu11.2.3-jdk11.0.1-win_x64.zip",
],
)

http_archive(
name = "remote_java_tools",
sha256 = "df33ddb3054f0ee70389368bd1dc2efe72eeb1f489dbcdf948f3f3b3058646b7",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,18 @@ public ImportDepsCheckingLevelConverter() {
help = "If enabled, the default --host_javabase is JDK 10.")
public boolean useJDK10AsHostJavaBase;

@Option(
name = "incompatible_use_jdk11_as_host_javabase",
defaultValue = "false",
documentationCategory = OptionDocumentationCategory.UNDOCUMENTED,
effectTags = {OptionEffectTag.UNKNOWN},
metadataTags = {
OptionMetadataTag.INCOMPATIBLE_CHANGE,
OptionMetadataTag.TRIGGERED_BY_ALL_INCOMPATIBLE_CHANGES
},
help = "If enabled, the default --host_javabase is JDK 11.")
public boolean useJDK11AsHostJavaBase;

@Option(
name = "javacopt",
allowMultiple = true,
Expand Down Expand Up @@ -615,11 +627,13 @@ public ImportDepsCheckingLevelConverter() {

private Label getHostJavaBase() {
if (hostJavaBase == null) {
if (useJDK11AsHostJavaBase) {
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:remote_jdk11");
}
if (useJDK10AsHostJavaBase) {
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:remote_jdk10");
} else {
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:host_jdk");
}
return Label.parseAbsoluteUnchecked("@bazel_tools//tools/jdk:host_jdk");
}
return hostJavaBase;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ public void setupMockClient(MockToolsConfig config, List<String> workspaceConten
"java_runtime(name = 'host_jdk', srcs = [])",
"java_runtime(name = 'remote_jdk', srcs = [])",
"java_runtime(name = 'remote_jdk10', srcs = [])",
"java_runtime(name = 'remote_jdk11', srcs = [])",
"java_runtime_alias(name = 'current_java_runtime')",
// This isn't actually the host runtime, but will do. This way, we don't need to pull in the
// Skylark implementation of the java_host_runtime_alias rule.
Expand Down

0 comments on commit f34ad0e

Please sign in to comment.