BUILD 1.7 KB

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