-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add predefined configurations to java_toolchain_default
In order for java_toolchain_default to be more usable, predefined configurations are supplied: `JVM8_TOOLCHAIN_CONFIGURATION`, `JAVABUILDER_TOOLCHAIN_CONFIGURATION`, `VANILLA_TOOLCHAIN_CONFIGURATION`, `PREBUILT_TOOLCHAIN_CONFIGURATION`. Those configurations are going to be needed once `java_runtime` is attached to `java_toolchain`, because predefined toolchain in `BUILD.java_tools` (e.g. vanilla_toolchain) will need to be removed (as they don't have a default choice of `java_runtime`). After that the user can use `java_toolchain_default(name="toolchain_vanilla", configuration = VANILLA_TOOLCHAIN_CONFIGURATION, java_runtime = ...)`. Additionally to this, `jvm_opts` parameter is automatically converted to absolute labels. For example from `--patch-module=java.compiler=$(location //:java_compiler_jar)` to `--patch-module=java.compiler=$(location @bazel_java_tools_linux//:java_compiler_jar)`. Also `java_toolchain_default.bzl` is renamed to `java_toolchain_default.bzl.java_tools` to make it accessible only from @java_tools repository and not @bazel_tools. In the latter it is was never supposed to work. Closes #12441. PiperOrigin-RevId: 342053742
- Loading branch information
1 parent
3e38144
commit e68b1e3
Showing
6 changed files
with
327 additions
and
273 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
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
Oops, something went wrong.