Skip to content

Commit 089aff2

Browse files
googlewaltswiple-rules-gardener
authored andcommitted
Internal change
PiperOrigin-RevId: 549805566
1 parent ac3f716 commit 089aff2

File tree

3 files changed

+14
-0
lines changed

3 files changed

+14
-0
lines changed

apple/internal/ios_rules.bzl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,17 +208,21 @@ def _ios_application_impl(ctx):
208208
)
209209

210210
extra_linkopts = []
211+
extra_requested_features = []
211212
if ctx.attr.sdk_frameworks:
212213
extra_linkopts.extend(
213214
collections.before_each("-framework", ctx.attr.sdk_frameworks),
214215
)
216+
if ctx.attr.testonly:
217+
extra_requested_features.append("exported_symbols")
215218

216219
link_result = linking_support.register_binary_linking_action(
217220
ctx,
218221
avoid_deps = ctx.attr.frameworks,
219222
entitlements = entitlements,
220223
exported_symbols_lists = ctx.files.exported_symbols_lists,
221224
extra_linkopts = extra_linkopts,
225+
extra_requested_features = extra_requested_features,
222226
platform_prerequisites = platform_prerequisites,
223227
rule_descriptor = rule_descriptor,
224228
stamp = ctx.attr.stamp,

apple/internal/macos_rules.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,10 +195,15 @@ def _macos_application_impl(ctx):
195195
validation_mode = ctx.attr.entitlements_validation,
196196
)
197197

198+
extra_requested_features = []
199+
if ctx.attr.testonly:
200+
extra_requested_features.append("exported_symbols")
201+
198202
link_result = linking_support.register_binary_linking_action(
199203
ctx,
200204
entitlements = entitlements,
201205
exported_symbols_lists = ctx.files.exported_symbols_lists,
206+
extra_requested_features = extra_requested_features,
202207
platform_prerequisites = platform_prerequisites,
203208
rule_descriptor = rule_descriptor,
204209
stamp = ctx.attr.stamp,

apple/internal/tvos_rules.bzl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,11 +199,16 @@ def _tvos_application_impl(ctx):
199199
validation_mode = ctx.attr.entitlements_validation,
200200
)
201201

202+
extra_requested_features = []
203+
if ctx.attr.testonly:
204+
extra_requested_features.append("exported_symbols")
205+
202206
link_result = linking_support.register_binary_linking_action(
203207
ctx,
204208
avoid_deps = ctx.attr.frameworks,
205209
entitlements = entitlements,
206210
exported_symbols_lists = ctx.files.exported_symbols_lists,
211+
extra_requested_features = extra_requested_features,
207212
platform_prerequisites = platform_prerequisites,
208213
rule_descriptor = rule_descriptor,
209214
stamp = ctx.attr.stamp,

0 commit comments

Comments
 (0)