BUILD 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/diagnostics:null_diagnostics",
  19. "//toolchain/driver:carbon",
  20. ],
  21. )
  22. genquery(
  23. name = "non_test_cc_deps.txt",
  24. expression = "kind('cc.* rule', deps(//bazel/check_deps:non_test_cc_rules))",
  25. opts = [
  26. "--notool_deps",
  27. "--noimplicit_deps",
  28. ],
  29. scope = [":non_test_cc_rules"],
  30. )
  31. py_test(
  32. name = "check_non_test_cc_deps",
  33. srcs = ["check_non_test_cc_deps.py"],
  34. data = [":non_test_cc_deps.txt"],
  35. main = "check_non_test_cc_deps.py",
  36. )