BUILD 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. py_binary(
  5. name = "migrate_cpp",
  6. srcs = ["migrate_cpp.py"],
  7. data = [
  8. ":clang_tidy.yaml",
  9. "//migrate_cpp/cpp_refactoring",
  10. ],
  11. python_version = "PY3",
  12. )
  13. cc_library(
  14. name = "output_segment",
  15. hdrs = ["output_segment.h"],
  16. deps = [
  17. "//common:check",
  18. "@llvm-project//clang:ast",
  19. ],
  20. )
  21. cc_library(
  22. name = "rewriter",
  23. srcs = ["rewriter.cpp"],
  24. hdrs = ["rewriter.h"],
  25. visibility = [
  26. # For dependency checking. Remove once it has a binary using it.
  27. "//bazel/check_deps:__pkg__",
  28. ],
  29. deps = [
  30. ":output_segment",
  31. "//common:check",
  32. "@llvm-project//clang:ast",
  33. "@llvm-project//clang:basic",
  34. "@llvm-project//clang:frontend",
  35. "@llvm-project//clang:lex",
  36. "@llvm-project//clang:tooling",
  37. "@llvm-project//clang:tooling_core",
  38. "@llvm-project//llvm:Support",
  39. ],
  40. )
  41. cc_test(
  42. name = "rewriter_test",
  43. srcs = ["rewriter_test.cpp"],
  44. deps = [
  45. ":rewriter",
  46. "//common:gtest_main",
  47. "@com_google_googletest//:gtest",
  48. "@llvm-project//clang:ast",
  49. "@llvm-project//clang:frontend",
  50. "@llvm-project//clang:tooling",
  51. ],
  52. )