Skip to content

Commit

Permalink
Add support for propagating macOS additional_contents transitive dSYMs.
Browse files Browse the repository at this point in the history
When additional_contents keys point to other apple rules to be embedded, the transitive dSYMs should be propagated when using the --define=apple.propagate_embedded_extra_outputs=1 flag.

RELNOTES: None
PiperOrigin-RevId: 229980101
  • Loading branch information
sergiocampama committed Jan 18, 2019
1 parent 4e48786 commit 9f89aaa
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions apple/internal/macos_rules.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _macos_application_impl(ctx):
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(
debug_dependencies = embedded_targets,
debug_dependencies = embedded_targets + ctx.attr.additional_contents.keys(),
debug_outputs_provider = debug_outputs_provider,
),
partials.embedded_bundles_partial(
Expand Down Expand Up @@ -142,6 +142,7 @@ def _macos_bundle_impl(ctx):
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(
debug_dependencies = ctx.attr.additional_contents.keys(),
debug_outputs_provider = binary_target[apple_common.AppleDebugOutputs],
),
partials.embedded_bundles_partial(
Expand Down Expand Up @@ -188,7 +189,10 @@ def _macos_extension_impl(ctx):
partials.apple_bundle_info_partial(bundle_id = bundle_id),
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(debug_outputs_provider = debug_outputs_provider),
partials.debug_symbols_partial(
debug_dependencies = ctx.attr.additional_contents.keys(),
debug_outputs_provider = debug_outputs_provider,
),
partials.embedded_bundles_partial(plugins = [outputs.archive(ctx)]),
partials.macos_additional_contents_partial(),
partials.resources_partial(
Expand Down Expand Up @@ -232,6 +236,7 @@ def _macos_kernel_extension_impl(ctx):
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(
debug_dependencies = ctx.attr.additional_contents.keys(),
debug_outputs_provider = debug_outputs_provider,
),
partials.embedded_bundles_partial(
Expand Down Expand Up @@ -275,6 +280,7 @@ def _macos_spotlight_importer_impl(ctx):
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(
debug_dependencies = ctx.attr.additional_contents.keys(),
debug_outputs_provider = debug_outputs_provider,
),
partials.embedded_bundles_partial(
Expand Down Expand Up @@ -318,6 +324,7 @@ def _macos_xpc_service_impl(ctx):
partials.binary_partial(binary_artifact = binary_artifact),
partials.clang_rt_dylibs_partial(binary_artifact = binary_artifact),
partials.debug_symbols_partial(
debug_dependencies = ctx.attr.additional_contents.keys(),
debug_outputs_provider = debug_outputs_provider,
),
partials.embedded_bundles_partial(
Expand Down

0 comments on commit 9f89aaa

Please sign in to comment.