Skip to content

Commit

Permalink
Let native Turbine image find ct.sym with non-hermetic java_runtime
Browse files Browse the repository at this point in the history
Work towards #21604

Closes #21610.

PiperOrigin-RevId: 613912980
Change-Id: Ibc620120b783c990d08b84ea6cd8ae224333ed8a
  • Loading branch information
fmeum authored and copybara-github committed Mar 8, 2024
1 parent 3d77b5a commit 061ddeb
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/main/starlark/builtins_bzl/common/java/java_toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,10 @@ def _java_toolchain_impl(ctx):
if java_runtime and java_runtime.lib_ct_sym:
header_compiler_direct_data = [java_runtime.lib_ct_sym]
header_compiler_direct_jvm_opts = ["-Dturbine.ctSymPath=" + java_runtime.lib_ct_sym.path]
elif java_runtime and java_runtime.java_home:
# Turbine finds ct.sym relative to java.home.
header_compiler_direct_data = []
header_compiler_direct_jvm_opts = ["-Djava.home=" + java_runtime.java_home]
else:
header_compiler_direct_data = []
header_compiler_direct_jvm_opts = []
Expand Down

0 comments on commit 061ddeb

Please sign in to comment.