BUILD 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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_cc//cc:defs.bzl", "cc_library")
  5. package(default_visibility = ["//visibility:public"])
  6. filegroup(
  7. name = "testdata",
  8. data = glob(["testdata/**/*.carbon"]),
  9. )
  10. cc_library(
  11. name = "lower",
  12. srcs = ["lower.cpp"],
  13. hdrs = ["lower.h"],
  14. deps = [
  15. ":context",
  16. "//toolchain/check:sem_ir_diagnostic_converter",
  17. "//toolchain/parse:tree",
  18. "//toolchain/sem_ir:file",
  19. "//toolchain/sem_ir:inst_namer",
  20. "@llvm-project//llvm:Core",
  21. "@llvm-project//llvm:Support",
  22. ],
  23. )
  24. cc_library(
  25. name = "context",
  26. srcs = [
  27. "constant.cpp",
  28. "constant.h",
  29. "file_context.cpp",
  30. "function_context.cpp",
  31. "mangler.cpp",
  32. "mangler.h",
  33. ] +
  34. # Glob handler files to avoid missing any.
  35. glob([
  36. "handle*.cpp",
  37. ]),
  38. hdrs = [
  39. "file_context.h",
  40. "function_context.h",
  41. ],
  42. deps = [
  43. "//common:check",
  44. "//common:map",
  45. "//common:raw_string_ostream",
  46. "//common:vlog",
  47. "//toolchain/base:kind_switch",
  48. "//toolchain/check:sem_ir_diagnostic_converter",
  49. "//toolchain/sem_ir:absolute_node_id",
  50. "//toolchain/sem_ir:entry_point",
  51. "//toolchain/sem_ir:file",
  52. "//toolchain/sem_ir:inst",
  53. "//toolchain/sem_ir:inst_namer",
  54. "//toolchain/sem_ir:typed_insts",
  55. "@llvm-project//llvm:Core",
  56. "@llvm-project//llvm:Support",
  57. "@llvm-project//llvm:TransformUtils",
  58. ],
  59. )