mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 08:51:04 +01:00
Noticed because we have a new dep on @platforms//os:macos in https://github.com/carbon-language/carbon-lang/blob/trunk/toolchain/base/BUILD#L131 macos is preferred according to the definition at https://github.com/bazelbuild/platforms/blob/dd28c190c563531c06ba3bd64eca1cc9ca3e667f/os/BUILD#L70C1-L74C2
49 lines
1.1 KiB
Python
49 lines
1.1 KiB
Python
# Part of the Carbon Language project, under the Apache License v2.0 with LLVM
|
|
# Exceptions. See /LICENSE for license information.
|
|
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
|
|
load("@bazel_skylib//lib:selects.bzl", "selects")
|
|
|
|
package(default_visibility = ["//visibility:public"])
|
|
|
|
# For use by rules.bzl.
|
|
# Matches when asan is enabled on a macOS platform.
|
|
selects.config_setting_group(
|
|
name = "macos_asan",
|
|
match_all = [
|
|
":is_macos",
|
|
":macos_asan_build_modes",
|
|
],
|
|
)
|
|
|
|
# For use by rules.bzl.
|
|
# Matches macOS platforms.
|
|
config_setting(
|
|
name = "is_macos",
|
|
constraint_values = ["@platforms//os:macos"],
|
|
)
|
|
|
|
# For use by rules.bzl.
|
|
# Matches build modes where asan is enabled.
|
|
selects.config_setting_group(
|
|
name = "macos_asan_build_modes",
|
|
match_any = [
|
|
":dbg",
|
|
":fastbuild",
|
|
],
|
|
)
|
|
|
|
# For use by rules.bzl.
|
|
# Matches dbg.
|
|
config_setting(
|
|
name = "dbg",
|
|
values = {"compilation_mode": "dbg"},
|
|
)
|
|
|
|
# For use by rules.bzl.
|
|
# Matches fastbuild.
|
|
config_setting(
|
|
name = "fastbuild",
|
|
values = {"compilation_mode": "fastbuild"},
|
|
)
|