clang_toolchain.BUILD 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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. # This file is symlinked into a configured Clang toolchain repository as the
  5. # root `BUILD` file for that repository.
  6. load("@rules_cc//cc:defs.bzl", "cc_library", "cc_toolchain", "cc_toolchain_suite")
  7. load(":cc_toolchain_config.bzl", "cc_toolchain_config")
  8. cc_library(
  9. name = "malloc",
  10. )
  11. filegroup(
  12. name = "empty",
  13. srcs = [],
  14. )
  15. cc_toolchain_suite(
  16. name = "bazel_cc_toolchain",
  17. toolchains = {
  18. "darwin": ":cc-compiler-darwin",
  19. "darwin_arm64": ":cc-compiler-darwin-arm64",
  20. "freebsd": "cc-compiler-freebsd",
  21. "k8": ":cc-compiler-k8",
  22. "x64_windows": ":cc-compiler-x64-windows",
  23. },
  24. )
  25. cc_toolchain(
  26. name = "cc-compiler-k8",
  27. all_files = ":empty",
  28. ar_files = ":empty",
  29. as_files = ":empty",
  30. compiler_files = ":empty",
  31. dwp_files = ":empty",
  32. linker_files = ":empty",
  33. objcopy_files = ":empty",
  34. strip_files = ":empty",
  35. supports_param_files = 1,
  36. toolchain_config = ":local-k8",
  37. toolchain_identifier = "local-k8",
  38. )
  39. cc_toolchain_config(
  40. name = "local-k8",
  41. target_cpu = "k8",
  42. )
  43. cc_toolchain(
  44. name = "cc-compiler-darwin",
  45. all_files = ":empty",
  46. ar_files = ":empty",
  47. as_files = ":empty",
  48. compiler_files = ":empty",
  49. dwp_files = ":empty",
  50. linker_files = ":empty",
  51. objcopy_files = ":empty",
  52. strip_files = ":empty",
  53. supports_param_files = 1,
  54. toolchain_config = ":local-darwin",
  55. toolchain_identifier = "local-darwin",
  56. )
  57. cc_toolchain_config(
  58. name = "local-darwin",
  59. target_cpu = "darwin",
  60. )
  61. cc_toolchain(
  62. name = "cc-compiler-darwin-arm64",
  63. all_files = ":empty",
  64. ar_files = ":empty",
  65. as_files = ":empty",
  66. compiler_files = ":empty",
  67. dwp_files = ":empty",
  68. linker_files = ":empty",
  69. objcopy_files = ":empty",
  70. strip_files = ":empty",
  71. supports_param_files = 1,
  72. toolchain_config = ":local-darwin-arm64",
  73. toolchain_identifier = "local-darwin-arm64",
  74. )
  75. cc_toolchain_config(
  76. name = "local-darwin-arm64",
  77. target_cpu = "darwin_arm64",
  78. )
  79. cc_toolchain(
  80. name = "cc-compiler-freebsd",
  81. all_files = ":empty",
  82. ar_files = ":empty",
  83. as_files = ":empty",
  84. compiler_files = ":empty",
  85. dwp_files = ":empty",
  86. linker_files = ":empty",
  87. objcopy_files = ":empty",
  88. strip_files = ":empty",
  89. supports_param_files = 1,
  90. toolchain_config = ":local-freebsd",
  91. toolchain_identifier = "local-freebsd",
  92. )
  93. cc_toolchain_config(
  94. name = "local-freebsd",
  95. target_cpu = "freebsd",
  96. )
  97. cc_toolchain(
  98. name = "cc-compiler-x64-windows",
  99. all_files = ":empty",
  100. ar_files = ":empty",
  101. as_files = ":empty",
  102. compiler_files = ":empty",
  103. dwp_files = ":empty",
  104. linker_files = ":empty",
  105. objcopy_files = ":empty",
  106. strip_files = ":empty",
  107. supports_param_files = 1,
  108. toolchain_config = ":local-x64-windows",
  109. toolchain_identifier = "local-x64-windows",
  110. )
  111. cc_toolchain_config(
  112. name = "local-x64-windows",
  113. target_cpu = "x64_windows",
  114. )