BUILD 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. # For use by rules.bzl.
  6. # Matches when asan is enabled on a macOS platform.
  7. selects.config_setting_group(
  8. name = "macos_asan",
  9. match_all = [
  10. ":is_macos",
  11. ":macos_asan_build_modes",
  12. ],
  13. )
  14. # For use by rules.bzl.
  15. # Matches macOS platforms.
  16. config_setting(
  17. name = "is_macos",
  18. constraint_values = ["@platforms//os:osx"],
  19. )
  20. # For use by rules.bzl.
  21. # Matches build modes where asan is enabled.
  22. selects.config_setting_group(
  23. name = "macos_asan_build_modes",
  24. match_any = [
  25. ":dbg",
  26. ":fastbuild",
  27. ],
  28. )
  29. # For use by rules.bzl.
  30. # Matches dbg.
  31. config_setting(
  32. name = "dbg",
  33. values = {"compilation_mode": "dbg"},
  34. )
  35. # For use by rules.bzl.
  36. # Matches fastbuild.
  37. config_setting(
  38. name = "fastbuild",
  39. values = {"compilation_mode": "fastbuild"},
  40. )