BUILD 1.6 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_skylib//lib:selects.bzl", "selects")
  5. package(default_visibility = ["//visibility:public"])
  6. # For use by defs.bzl.
  7. # Matches when asan is enabled on a macOS platform.
  8. selects.config_setting_group(
  9. name = "macos_asan",
  10. match_all = [
  11. ":is_macos",
  12. ":macos_asan_build_modes",
  13. ],
  14. )
  15. # For use by defs.bzl.
  16. # Matches macOS platforms.
  17. config_setting(
  18. name = "is_macos",
  19. constraint_values = ["@platforms//os:macos"],
  20. )
  21. # For use by defs.bzl.
  22. # Matches build modes where asan is enabled.
  23. selects.config_setting_group(
  24. name = "macos_asan_build_modes",
  25. match_any = [
  26. ":dbg",
  27. ":fastbuild",
  28. ],
  29. )
  30. # For use by defs.bzl.
  31. # Matches dbg.
  32. config_setting(
  33. name = "dbg",
  34. values = {"compilation_mode": "dbg"},
  35. )
  36. # For use by defs.bzl.
  37. # Matches fastbuild.
  38. config_setting(
  39. name = "fastbuild",
  40. values = {"compilation_mode": "fastbuild"},
  41. )
  42. filegroup(
  43. name = "installed_cc_toolchain_starlark",
  44. srcs = [
  45. "cc_toolchain_actions.bzl",
  46. "cc_toolchain_base_features.bzl",
  47. "cc_toolchain_config_features.bzl",
  48. "cc_toolchain_cpp_features.bzl",
  49. "cc_toolchain_debugging.bzl",
  50. "cc_toolchain_features.bzl",
  51. "cc_toolchain_linking.bzl",
  52. "cc_toolchain_modules.bzl",
  53. "cc_toolchain_optimization.bzl",
  54. "cc_toolchain_sanitizer_features.bzl",
  55. "cc_toolchain_tools.bzl",
  56. ],
  57. )