Skip to content

Commit

Permalink
Fix DWARF binary not copied for AppleDsymBundleInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
luispadron committed Feb 14, 2024
1 parent afbd131 commit 8105457
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions apple/internal/partials/debug_symbols.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -303,13 +303,21 @@ def _bundle_dsym_files(
found_binaries_by_arch.update(dsym_binaries)

if found_binaries_by_arch:
output_files = _copy_dsyms_into_declared_bundle(
dsyms = _copy_dsyms_into_declared_bundle(
actions = actions,
debug_output_filename = dsym_output_filename,
dsym_bundle_name = dsym_bundle_name,
found_binaries_by_arch = found_binaries_by_arch,
platform_prerequisites = platform_prerequisites,
)
output_files.extend(dsyms)
dsyms_command = (" && ".join([
"cp \"{dsym_path}\" \"${{OUTPUT_DIR}}/Contents/Resources/DWARF/{dsym_bundle_name}\"".format(
dsym_path = dsym.path,
dsym_bundle_name = dsym_output_filename,
)
for dsym in dsyms
]))

# If we found any binaries, create the Info.plist for the bundle as well.
dsym_plist = _generate_dsym_info_plist(
Expand All @@ -334,9 +342,9 @@ def _bundle_dsym_files(
apple_support.run_shell(
actions = actions,
apple_fragment = platform_prerequisites.apple_fragment,
inputs = [dsym_plist] + found_binaries_by_arch.values(),
inputs = dsyms + [dsym_plist] + found_binaries_by_arch.values(),
outputs = [dsym_bundle_dir],
command = ("mkdir -p \"${OUTPUT_DIR}/Contents/Resources/DWARF\" && " + plist_command),
command = ("mkdir -p \"${OUTPUT_DIR}/Contents/Resources/DWARF\" && " + dsyms_command + " && " + plist_command),
env = {
"OUTPUT_DIR": dsym_bundle_dir.path,
},
Expand Down

0 comments on commit 8105457

Please sign in to comment.