BUILD 1.1 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. package(default_visibility = ["//visibility:public"])
  5. cc_library(
  6. name = "diagnostic_emitter",
  7. srcs = ["diagnostic_emitter.cpp"],
  8. hdrs = ["diagnostic_emitter.h"],
  9. deps = ["@llvm-project//llvm:Support"],
  10. )
  11. cc_library(
  12. name = "null_diagnostics",
  13. hdrs = ["null_diagnostics.h"],
  14. deps = [
  15. ":diagnostic_emitter",
  16. "@llvm-project//llvm:Support",
  17. ],
  18. )
  19. cc_library(
  20. name = "mocks",
  21. testonly = 1,
  22. hdrs = ["mocks.h"],
  23. deps = [
  24. ":diagnostic_emitter",
  25. "@llvm-project//llvm:Support",
  26. "@llvm-project//llvm:gmock",
  27. ],
  28. )
  29. cc_test(
  30. name = "diagnostic_emitter_test",
  31. srcs = ["diagnostic_emitter_test.cpp"],
  32. deps = [
  33. ":diagnostic_emitter",
  34. ":mocks",
  35. "@llvm-project//llvm:Support",
  36. "@llvm-project//llvm:gmock",
  37. "@llvm-project//llvm:gtest",
  38. "@llvm-project//llvm:gtest_main",
  39. ],
  40. )