Skip to content

Commit b91a610

Browse files
milendfacebook-github-bot
authored andcommitted
Compile watchOS resources on Mac RE
Summary: Compile all watchOS resources on remotely. `ctx.actions.run()` does not support `remote_required`, so we just have to go with `prefer_remote` for now. Reviewed By: ChrisRicca Differential Revision: D62501192 fbshipit-source-id: d350b7cd7410785719a423dbf4c67fb7060615bc
1 parent e91599e commit b91a610

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

prelude/apple/apple_bundle_utility.bzl

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,13 @@ def get_bundle_min_target_version(ctx: AnalysisContext, binary_or_binaries: [dic
6767

6868
def get_bundle_resource_processing_options(ctx: AnalysisContext) -> AppleResourceProcessingOptions:
6969
compile_resources_locally = value_or(ctx.attrs._compile_resources_locally_override, ctx.attrs._apple_toolchain[AppleToolchainInfo].compile_resources_locally)
70-
return AppleResourceProcessingOptions(prefer_local = compile_resources_locally, allow_cache_upload = compile_resources_locally)
70+
is_watch_bundle = get_is_watch_bundle(ctx)
71+
return AppleResourceProcessingOptions(
72+
prefer_local = compile_resources_locally and (not is_watch_bundle),
73+
# TODO: Remote execution preference should be part of `apple_toolchain()`, same as `compile_resources_locally`
74+
prefer_remote = is_watch_bundle,
75+
allow_cache_upload = compile_resources_locally,
76+
)
7177

7278
def get_bundle_infos_from_graph(graph: ResourceGraphInfo) -> list[AppleBundleLinkerMapInfo]:
7379
bundle_infos = []

0 commit comments

Comments
 (0)