Skip to content

Commit

Permalink
Internal change
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 549805566
  • Loading branch information
googlewalt authored and swiple-rules-gardener committed Jul 21, 2023
1 parent ac3f716 commit 089aff2
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apple/internal/ios_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,21 @@ def _ios_application_impl(ctx):
)

extra_linkopts = []
extra_requested_features = []
if ctx.attr.sdk_frameworks:
extra_linkopts.extend(
collections.before_each("-framework", ctx.attr.sdk_frameworks),
)
if ctx.attr.testonly:
extra_requested_features.append("exported_symbols")

link_result = linking_support.register_binary_linking_action(
ctx,
avoid_deps = ctx.attr.frameworks,
entitlements = entitlements,
exported_symbols_lists = ctx.files.exported_symbols_lists,
extra_linkopts = extra_linkopts,
extra_requested_features = extra_requested_features,
platform_prerequisites = platform_prerequisites,
rule_descriptor = rule_descriptor,
stamp = ctx.attr.stamp,
Expand Down
5 changes: 5 additions & 0 deletions apple/internal/macos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,15 @@ def _macos_application_impl(ctx):
validation_mode = ctx.attr.entitlements_validation,
)

extra_requested_features = []
if ctx.attr.testonly:
extra_requested_features.append("exported_symbols")

link_result = linking_support.register_binary_linking_action(
ctx,
entitlements = entitlements,
exported_symbols_lists = ctx.files.exported_symbols_lists,
extra_requested_features = extra_requested_features,
platform_prerequisites = platform_prerequisites,
rule_descriptor = rule_descriptor,
stamp = ctx.attr.stamp,
Expand Down
5 changes: 5 additions & 0 deletions apple/internal/tvos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -199,11 +199,16 @@ def _tvos_application_impl(ctx):
validation_mode = ctx.attr.entitlements_validation,
)

extra_requested_features = []
if ctx.attr.testonly:
extra_requested_features.append("exported_symbols")

link_result = linking_support.register_binary_linking_action(
ctx,
avoid_deps = ctx.attr.frameworks,
entitlements = entitlements,
exported_symbols_lists = ctx.files.exported_symbols_lists,
extra_requested_features = extra_requested_features,
platform_prerequisites = platform_prerequisites,
rule_descriptor = rule_descriptor,
stamp = ctx.attr.stamp,
Expand Down

1 comment on commit 089aff2

@keith
Copy link
Member

@keith keith commented on 089aff2 Aug 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.