forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Attach Java runtime to Java toolchains
Defining a new rule "java_runtime_version_alias", which uses a custom configuration flag transition to select a specific version of remote JDK. Added a weird "selected_java_runtime" attribute, which needs to exist until the incompatible_use_java_toolchain_resolution is flipped. Added the test for the attached runtime and fixing the test for host_javabase (now it is only modified for targets in exec configuration). Bootstrap_toolchain had to be moved to another file, because of java_runtime attribute, which is not yet released. Related to bazelbuild#4592 Closes bazelbuild#12677. PiperOrigin-RevId: 346825514
- Loading branch information
1 parent
1877f0e
commit 37eb1d7
Showing
11 changed files
with
193 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain") | ||
|
||
# This toolchain is used to bootstrap Bazel. | ||
default_java_toolchain( | ||
name = "bootstrap_toolchain", | ||
bootclasspath = ["@bazel_tools//tools/jdk:platformclasspath.jar"], | ||
genclass = ["//src/java_tools/buildjar:bootstrap_genclass_deploy.jar"], | ||
ijar = ["//third_party/ijar"], | ||
java_runtime = "@local_jdk//:jdk", | ||
javabuilder = ["//src/java_tools/buildjar:bootstrap_VanillaJavaBuilder_deploy.jar"], | ||
jvm_opts = [ | ||
# Prevent "Could not reserve enough space for object heap" errors on Windows. | ||
"-Xmx512m", | ||
# Using tiered compilation improves performance of Javac when not using the worker mode. | ||
"-XX:+TieredCompilation", | ||
"-XX:TieredStopAtLevel=1", | ||
], | ||
singlejar = ["//src/java_tools/singlejar:bootstrap_deploy.jar"], | ||
source_version = "8", | ||
tags = ["manual"], | ||
target_version = "8", | ||
visibility = ["//visibility:public"], | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters