BUILD 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 rules.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 rules.bzl.
  16. # Matches macOS platforms.
  17. config_setting(
  18. name = "is_macos",
  19. constraint_values = ["@platforms//os:osx"],
  20. )
  21. # For use by rules.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 rules.bzl.
  31. # Matches dbg.
  32. config_setting(
  33. name = "dbg",
  34. values = {"compilation_mode": "dbg"},
  35. )
  36. # For use by rules.bzl.
  37. # Matches fastbuild.
  38. config_setting(
  39. name = "fastbuild",
  40. values = {"compilation_mode": "fastbuild"},
  41. )