Skip to content

Commit

Permalink
Compile watchOS resources on Mac RE
Browse files Browse the repository at this point in the history
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
  • Loading branch information
milend authored and facebook-github-bot committed Sep 12, 2024
1 parent e91599e commit b91a610
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion prelude/apple/apple_bundle_utility.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,13 @@ def get_bundle_min_target_version(ctx: AnalysisContext, binary_or_binaries: [dic

def get_bundle_resource_processing_options(ctx: AnalysisContext) -> AppleResourceProcessingOptions:
compile_resources_locally = value_or(ctx.attrs._compile_resources_locally_override, ctx.attrs._apple_toolchain[AppleToolchainInfo].compile_resources_locally)
return AppleResourceProcessingOptions(prefer_local = compile_resources_locally, allow_cache_upload = compile_resources_locally)
is_watch_bundle = get_is_watch_bundle(ctx)
return AppleResourceProcessingOptions(
prefer_local = compile_resources_locally and (not is_watch_bundle),
# TODO: Remote execution preference should be part of `apple_toolchain()`, same as `compile_resources_locally`
prefer_remote = is_watch_bundle,
allow_cache_upload = compile_resources_locally,
)

def get_bundle_infos_from_graph(graph: ResourceGraphInfo) -> list[AppleBundleLinkerMapInfo]:
bundle_infos = []
Expand Down

0 comments on commit b91a610

Please sign in to comment.