BUILD 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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/sem_ir:file",
  17. "//toolchain/sem_ir:inst_namer",
  18. "@llvm-project//llvm:Core",
  19. "@llvm-project//llvm:Support",
  20. ],
  21. )
  22. cc_library(
  23. name = "context",
  24. srcs = [
  25. "constant.cpp",
  26. "constant.h",
  27. "file_context.cpp",
  28. "function_context.cpp",
  29. ] +
  30. # Glob handler files to avoid missing any.
  31. glob([
  32. "handle*.cpp",
  33. ]),
  34. hdrs = [
  35. "file_context.h",
  36. "function_context.h",
  37. ],
  38. deps = [
  39. "//common:check",
  40. "//common:vlog",
  41. "//toolchain/base:kind_switch",
  42. "//toolchain/sem_ir:entry_point",
  43. "//toolchain/sem_ir:file",
  44. "//toolchain/sem_ir:inst",
  45. "//toolchain/sem_ir:inst_kind",
  46. "//toolchain/sem_ir:inst_namer",
  47. "@llvm-project//llvm:Core",
  48. "@llvm-project//llvm:Support",
  49. ],
  50. )