BUILD 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. "//migrate_cpp:rewriter",
  17. "//migrate_cpp/cpp_refactoring",
  18. "//toolchain/install:carbon-busybox",
  19. # The tree sitter rules can't be queried; evaluation fails on
  20. # @platforms.
  21. # "//utils/tree_sitter",
  22. ],
  23. tags = ["manual"],
  24. )
  25. genquery(
  26. name = "non_test_cc_deps.txt",
  27. expression =
  28. "kind('cc.* rule', deps(//bazel/check_deps:non_test_cc_rules))",
  29. opts = [
  30. "--notool_deps",
  31. "--noimplicit_deps",
  32. ],
  33. scope = [":non_test_cc_rules"],
  34. )
  35. py_test(
  36. name = "check_non_test_cc_deps",
  37. size = "small",
  38. srcs = ["check_non_test_cc_deps.py"],
  39. data = [":non_test_cc_deps.txt"],
  40. main = "check_non_test_cc_deps.py",
  41. )