diff --git a/src/test/shell/bazel/bazel_java_tools_test.sh b/src/test/shell/bazel/bazel_java_tools_test.sh index 554a06af145630..94c570ddf410ce 100755 --- a/src/test/shell/bazel/bazel_java_tools_test.sh +++ b/src/test/shell/bazel/bazel_java_tools_test.sh @@ -192,8 +192,22 @@ function test_java_tools_singlejar_builds() { bazel build @local_java_tools//:singlejar_cc_bin || fail "singlejar failed to build" } +function test_java_tools_singlejar_builds_with_layering_check() { + type -P clang || return + + bazel build --repo_env=CC=clang --features=layering_check \ + @local_java_tools//:singlejar_cc_bin || fail "singlejar failed to build with layering check" +} + function test_java_tools_ijar_builds() { bazel build @local_java_tools//:ijar_cc_binary || fail "ijar failed to build" } +function test_java_tools_ijar_builds_with_layering_check() { + type -P clang || return + + bazel build --repo_env=CC=clang --features=layering_check \ + @local_java_tools//:ijar_cc_binary || fail "ijar failed to build with layering check" +} + run_suite "Java tools archive tests" diff --git a/tools/jdk/BUILD.java_tools b/tools/jdk/BUILD.java_tools index a01a945f98b925..e210eff23130fc 100644 --- a/tools/jdk/BUILD.java_tools +++ b/tools/jdk/BUILD.java_tools @@ -381,6 +381,8 @@ cc_binary( malloc = ":malloc", visibility = ["//visibility:public"], deps = [ + ":combiners", + ":diag", ":options", ":output_jar", "//java_tools/zlib",