BUILD 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. # Part of the Carbon Language project, under the Apache License v2.0 with LLVM
  2. # Exceptions. See /LICENSE for license information.
  3. # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  4. load("@rules_python//python:defs.bzl", "py_test")
  5. # The filegroups establishing root rules for `genquery` invocations can be
  6. # updated by running:
  7. #
  8. # ```
  9. # ./bazel/check_deps/update_roots.py
  10. # ```
  11. filegroup(
  12. name = "non_test_cc_rules",
  13. data = [
  14. "//explorer",
  15. "//installers/local:carbon",
  16. "//toolchain/install:carbon-busybox",
  17. # The tree sitter rules can't be queried; evaluation fails on
  18. # @platforms.
  19. # "//utils/tree_sitter",
  20. ],
  21. tags = ["manual"],
  22. )
  23. genquery(
  24. name = "non_test_cc_deps.txt",
  25. expression =
  26. "kind('cc.* rule', deps(//bazel/check_deps:non_test_cc_rules))",
  27. opts = [
  28. "--notool_deps",
  29. "--noimplicit_deps",
  30. ],
  31. scope = [":non_test_cc_rules"],
  32. )
  33. py_test(
  34. name = "check_non_test_cc_deps",
  35. size = "small",
  36. srcs = ["check_non_test_cc_deps.py"],
  37. data = [":non_test_cc_deps.txt"],
  38. main = "check_non_test_cc_deps.py",
  39. )