From 1fb68e3638108468c56f3a8dd190b7b36c09c802 Mon Sep 17 00:00:00 2001 From: Luis Padron Date: Thu, 8 Feb 2024 15:03:07 -0500 Subject: [PATCH] Fix DWARF binary not copied for AppleDsymBundleInfo --- apple/internal/partials/debug_symbols.bzl | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/apple/internal/partials/debug_symbols.bzl b/apple/internal/partials/debug_symbols.bzl index a7351a5d32..b96c5c3ad7 100644 --- a/apple/internal/partials/debug_symbols.bzl +++ b/apple/internal/partials/debug_symbols.bzl @@ -310,6 +310,13 @@ def _bundle_dsym_files( found_binaries_by_arch = found_binaries_by_arch, platform_prerequisites = platform_prerequisites, ) + 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 output_files + ])) # If we found any binaries, create the Info.plist for the bundle as well. dsym_plist = _generate_dsym_info_plist( @@ -336,7 +343,7 @@ def _bundle_dsym_files( apple_fragment = platform_prerequisites.apple_fragment, inputs = [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, },