Skip to content

Commit a025c99

Browse files
nglevinluispadron
authored andcommitted
Add platform attributes to the deprecated "apple_binary", allowing it to work with the new platform-based resolution that has been added to the shared Apple linker logic.
Cherry-pick: 0654124
1 parent 87017f9 commit a025c99

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

apple/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ bzl_library(
5656
"//apple/internal:rule_attrs",
5757
"//apple/internal:rule_factory",
5858
"//apple/internal:transition_support",
59+
"@build_bazel_apple_support//lib:apple_support",
5960
],
6061
)
6162

apple/apple_binary.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414

1515
"""Starlark implementation of `apple_binary` to transition from native Bazel."""
1616

17+
load(
18+
"@build_bazel_apple_support//lib:apple_support.bzl",
19+
"apple_support",
20+
)
1721
load(
1822
"//apple/internal:linking_support.bzl",
1923
"linking_support",
@@ -147,6 +151,7 @@ implementation of `apple_binary` in Bazel core so that it can be removed.
147151
""",
148152
implementation = _apple_binary_impl,
149153
attrs = [
154+
apple_support.platform_constraint_attrs(),
150155
rule_attrs.binary_linking_attrs(
151156
deps_cfg = transition_support.apple_platform_split_transition,
152157
is_test_supporting_rule = False,

0 commit comments

Comments
 (0)