mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-16 13:08:13 +00:00
Note this will need to be set per-cc_binary, but I don't think there's a good way to avoid that. I didn't try hijacking the `cc_binary` rule name because that felt a bit excessive. We probably will have a few binaries we want to run directly, but I don't think it needs to be addressed on every last one. This is part of addressing #1404
33 lines
754 B
Python
33 lines
754 B
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")
|
|
|
|
exports_files(["env.bzl"])
|
|
|
|
selects.config_setting_group(
|
|
name = "macos_asan",
|
|
match_all = [":is_macos", ":macos_asan_build_modes"],
|
|
)
|
|
|
|
config_setting(
|
|
name = "is_macos",
|
|
constraint_values = ["@platforms//os:osx"],
|
|
)
|
|
|
|
selects.config_setting_group(
|
|
name = "macos_asan_build_modes",
|
|
match_any = [":dbg", ":fastbuild"],
|
|
)
|
|
|
|
config_setting(
|
|
name = "dbg",
|
|
values = {"compilation_mode": "dbg"},
|
|
)
|
|
|
|
config_setting(
|
|
name = "fastbuild",
|
|
values = {"compilation_mode": "fastbuild"},
|
|
)
|