1# For workaround https://github.com/bazelbuild/bazel/issues/8772 with Bazel >= 0.29.1
2# TensorFlow still targets Java 1.7 (See JAVACOPTS in tensorflow/java/build_defs.bzl)
3# which doesn't support "-parameters" flag. Starting from Java 11 (default since Bazel
4# 0.29.1), a warning message will be thrown if "-parameters" is passed. If "-Werror" also exists,
5# the compiling action will fail. To workaround this, we override the misc value of
6# the default java toolchain to remove "-parameters" flag.
7load("@bazel_tools//tools/jdk:default_java_toolchain.bzl", "default_java_toolchain")
8
9licenses(["notice"])
10
11default_java_toolchain(
12    name = "tf_java_toolchain",
13    misc = [
14        "-XDskipDuplicateBridges=true",
15        "-g",
16    ],
17    visibility = ["//visibility:public"],
18)
19