Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion cc/toolchains/impl/toolchain_config.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def _cc_toolchain_config_impl(ctx):
# compiler
compiler = ctx.attr.compiler,
target_cpu = ctx.attr.cpu,
target_libc = ctx.attr.target_libc, # Used by legacy features to determine if we're building for Apple platfroms or not
# These fields are only relevant for legacy toolchain resolution.
target_system_name = "",
target_libc = "",
abi_version = "",
abi_libc_version = "",
),
Expand All @@ -105,6 +105,7 @@ cc_toolchain_config = rule(
# Attributes new to this rule.
"compiler": attr.string(default = ""),
"cpu": attr.string(default = ""),
"target_libc": attr.string(default = ""),
"tool_map": attr.label(providers = [ToolConfigInfo], mandatory = True),
"args": attr.label_list(providers = [ArgsListInfo]),
"known_features": attr.label_list(providers = [FeatureSetInfo]),
Expand Down
4 changes: 4 additions & 0 deletions cc/toolchains/toolchain.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ def cc_toolchain(
Label("//cc/toolchains/impl:windows_x86_64"): "win64",
"//conditions:default": "",
}),
target_libc = select({
Label("//cc/toolchains/platforms:apple"): "macosx",
"//conditions:default": "",
}),
visibility = ["//visibility:private"],
**kwargs
)
Expand Down