summaryrefslogtreecommitdiff
path: root/kleaf/bazel.py
diff options
context:
space:
mode:
authorMatthias Maennich <maennich@google.com>2024-02-09 11:19:02 +0000
committerMatthias Männich <maennich@google.com>2024-02-14 09:36:32 +0000
commite46a95238deb7da627c5c12adef7090eae8646f3 (patch)
treea4b2a6d22ee31d462ca2767ab8535740ff2244c9 /kleaf/bazel.py
parent132ed331ca0d15e223ec669c72dadc6bc2bd3c35 (diff)
downloadbuild-e46a95238deb7da627c5c12adef7090eae8646f3.tar.gz
Kleaf: switch to the builtin JDK that comes along with the bazel release
The most recent bazel version comes bundled with a suitable JDK and hence we can drop any special handling for running bazel with a different JDK. Change-Id: Id106e9e822ef471442189f398f247d08ed933bbd Signed-off-by: Matthias Maennich <maennich@google.com>
Diffstat (limited to 'kleaf/bazel.py')
-rwxr-xr-xkleaf/bazel.py11
1 files changed, 1 insertions, 10 deletions
diff --git a/kleaf/bazel.py b/kleaf/bazel.py
index 3e10a7b..2d12b7c 100755
--- a/kleaf/bazel.py
+++ b/kleaf/bazel.py
@@ -25,7 +25,6 @@ from typing import Tuple, Optional
from kleaf_help import KleafHelpPrinter, FLAGS_BAZEL_RC
_BAZEL_REL_PATH = "prebuilts/kernel-build-tools/bazel/linux-x86_64/bazel"
-_BAZEL_JDK_REL_PATH = "prebuilts/jdk/jdk11/linux-x86"
# Sync with the following files:
# kleaf/impl/kernel_build.bzl
@@ -84,11 +83,8 @@ class BazelWrapper(KleafHelpPrinter):
# Root of the top level workspace (named "@"), where WORKSPACE
# is located. This is not necessarily
# equal to kleaf_repo_dir, especially when Kleaf tooling is in a subworkspace.
- bazel_jdk_path = self.kleaf_repo_dir / _BAZEL_JDK_REL_PATH
self.workspace_dir = pathlib.Path(subprocess.check_output(
- [self.bazel_path,
- f"--server_javabase={bazel_jdk_path}",
- "info", "workspace"],
+ [self.bazel_path, "info", "workspace"],
text=True).strip())
command_idx = None
@@ -295,11 +291,6 @@ class BazelWrapper(KleafHelpPrinter):
if self.known_args.user_clang_toolchain is not None:
self.env["KLEAF_USER_CLANG_TOOLCHAIN_PATH"] = self.known_args.user_clang_toolchain
- bazel_jdk_path = self.kleaf_repo_dir / _BAZEL_JDK_REL_PATH
- self.transformed_startup_options.append(
- f"--server_javabase={bazel_jdk_path}"
- )
-
self._handle_bazelrc()
def _handle_bazelrc(self):