From 8746d45240cc3973979916594793ecc2092fe533 Mon Sep 17 00:00:00 2001 From: cushon Date: Wed, 11 May 2022 14:04:10 -0700 Subject: [PATCH] Pass `-Dsun.io.useCanonCaches=false` to JavaBuilder PiperOrigin-RevId: 448079808 --- tools/jdk/default_java_toolchain.bzl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/jdk/default_java_toolchain.bzl b/tools/jdk/default_java_toolchain.bzl index 4e24aa3a8931e0..183dd55b10805c 100644 --- a/tools/jdk/default_java_toolchain.bzl +++ b/tools/jdk/default_java_toolchain.bzl @@ -34,6 +34,10 @@ BASE_JDK9_JVM_OPTS = [ # and: https://github.com/bazelbuild/bazel/issues/5599 "--add-opens=java.base/java.nio=ALL-UNNAMED", "--add-opens=java.base/java.lang=ALL-UNNAMED", + + # TODO(b/64485048): Disable this option in persistent worker mode only. + # Disable symlinks resolution cache since symlinks in exec root change + "-Dsun.io.useCanonCaches=false", ] JDK9_JVM_OPTS = BASE_JDK9_JVM_OPTS @@ -243,11 +247,11 @@ _bootclasspath = rule( implementation = _bootclasspath_impl, attrs = { "host_javabase": attr.label( - cfg = "host", + cfg = "exec", providers = [java_common.JavaRuntimeInfo], ), "src": attr.label( - cfg = "host", + cfg = "exec", allow_single_file = True, ), "target_javabase": attr.label(