diff --git a/src/main/starlark/builtins_bzl/bazel/java/bazel_java_binary.bzl b/src/main/starlark/builtins_bzl/bazel/java/bazel_java_binary.bzl index 4f910cccfa25a3..7cb4707aa0fb55 100644 --- a/src/main/starlark/builtins_bzl/bazel/java/bazel_java_binary.bzl +++ b/src/main/starlark/builtins_bzl/bazel/java/bazel_java_binary.bzl @@ -297,6 +297,7 @@ def make_java_binary(executable, resolve_launcher_flag, has_launcher = False): name = "launcher", ) if resolve_launcher_flag else (_compute_launcher_attr if has_launcher else None), ), + "_use_auto_exec_groups": attr.bool(default = True), }, ({} if executable else { "args": attr.string_list(), diff --git a/src/main/starlark/builtins_bzl/common/java/java_binary.bzl b/src/main/starlark/builtins_bzl/common/java/java_binary.bzl index c7890e8e8a6cbe..85cb7deefc0e92 100644 --- a/src/main/starlark/builtins_bzl/common/java/java_binary.bzl +++ b/src/main/starlark/builtins_bzl/common/java/java_binary.bzl @@ -377,6 +377,7 @@ def _create_shared_archive(ctx, java_attrs): mnemonic = "JavaJSA", progress_message = "Dumping Java Shared Archive %s" % jsa.short_path, executable = runtime.java_executable_exec_path, + toolchain = semantics.JAVA_RUNTIME_TOOLCHAIN_TYPE, inputs = depset(input_files, transitive = [runtime.files]), outputs = [jsa], arguments = [args], @@ -411,6 +412,7 @@ def _create_one_version_check(ctx, inputs): mnemonic = "JavaOneVersion", progress_message = "Checking for one-version violations in %{label}", executable = tool, + toolchain = semantics.JAVA_TOOLCHAIN_TYPE, inputs = depset([allowlist], transitive = [inputs]), tools = [tool], outputs = [output], diff --git a/src/main/starlark/builtins_bzl/common/java/java_util.bzl b/src/main/starlark/builtins_bzl/common/java/java_util.bzl index 3930a2b53fad30..be5cae17f7dba9 100644 --- a/src/main/starlark/builtins_bzl/common/java/java_util.bzl +++ b/src/main/starlark/builtins_bzl/common/java/java_util.bzl @@ -46,6 +46,7 @@ def create_single_jar(ctx, output, *input_depsets): mnemonic = "JavaSingleJar", progress_message = "Building singlejar jar %s" % output.short_path, executable = toolchain.single_jar, + toolchain = semantics.JAVA_TOOLCHAIN_TYPE, inputs = all_inputs, tools = [toolchain.single_jar], outputs = [output],