Skip to content

Commit

Permalink
Fix strict deps violation in singlejar build
Browse files Browse the repository at this point in the history
singlejar and hence the `NONPREBUILT_TOOLCHAIN_CONFIGURATION` did not
build with `--features=layering_check` due to includes being used from
indirect dependencies.

Work towards bazelbuild#13944 (comment)
  • Loading branch information
fmeum committed Oct 7, 2022
1 parent ccb2cc0 commit b295c1b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/shell/bazel/bazel_java_tools_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
2 changes: 2 additions & 0 deletions tools/jdk/BUILD.java_tools
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,8 @@ cc_binary(
malloc = ":malloc",
visibility = ["//visibility:public"],
deps = [
":combiners",
":diag",
":options",
":output_jar",
"//java_tools/zlib",
Expand Down

0 comments on commit b295c1b

Please sign in to comment.