clang_toolchain.BUILD 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  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. "k8": ":cc-compiler-k8",
  20. },
  21. )
  22. cc_toolchain(
  23. name = "cc-compiler-k8",
  24. all_files = ":empty",
  25. ar_files = ":empty",
  26. as_files = ":empty",
  27. compiler_files = ":empty",
  28. dwp_files = ":empty",
  29. linker_files = ":empty",
  30. objcopy_files = ":empty",
  31. strip_files = ":empty",
  32. supports_param_files = 1,
  33. toolchain_config = ":local-k8",
  34. toolchain_identifier = "local-k8",
  35. )
  36. cc_toolchain_config(
  37. name = "local-k8",
  38. target_cpu = "k8",
  39. )
  40. cc_toolchain(
  41. name = "cc-compiler-darwin",
  42. all_files = ":empty",
  43. ar_files = ":empty",
  44. as_files = ":empty",
  45. compiler_files = ":empty",
  46. dwp_files = ":empty",
  47. linker_files = ":empty",
  48. objcopy_files = ":empty",
  49. strip_files = ":empty",
  50. supports_param_files = 1,
  51. toolchain_config = ":local-darwin",
  52. toolchain_identifier = "local-darwin",
  53. )
  54. cc_toolchain_config(
  55. name = "local-darwin",
  56. target_cpu = "darwin",
  57. )