blob: d52bef7cbd4eb625c34e25e59d6122561a7ba842 [file] [log] [blame]
load("@build_bazel_apple_support//configs:platforms.bzl", "APPLE_PLATFORMS_CONSTRAINTS")
_OSX_DEVELOPER_PLATFORM_CPUS = [
"arm64",
"x86_64",
]
[
toolchain(
name = "cc-toolchain-" + arch + "-" + cpu,
exec_compatible_with = [
# These only execute on macOS.
"@platforms//os:macos",
"@platforms//cpu:" + cpu,
],
target_compatible_with = APPLE_PLATFORMS_CONSTRAINTS[arch],
toolchain = "@local_config_apple_cc//:cc-compiler-" + arch,
toolchain_type = "@bazel_tools//tools/cpp:toolchain_type",
visibility = ["//visibility:public"],
)
for arch in APPLE_PLATFORMS_CONSTRAINTS.keys()
for cpu in _OSX_DEVELOPER_PLATFORM_CPUS
]