Reland "Exposes that the dSYM bundle contains relocation information"

This is a reland of commit f43ecb28537f224316be099488787335149b0f4f

The original CL had a design flaw: the value of `dsym_arch` defined
in //build/config/apple/symbols.gni cannot be used in the definition
of a toolchain since all toolchain are defined in the context of the
default toolchain (i.e. `current_cpu` == `target_cpu`).

Instead the toolchain definition needs to duplicate the logic to
determine the value of `dsym_arch` using `toolchain_args.current_cpu`
as the value for the cpu architecture.

Additionally, since all toolchains are evaluated even if not used,
the logic in the toolchain definition cannot assert(false, ...) for
old architectures (since there are toolchains defined with a value
of current_cpu set to "arm" or "x86" -- those toolchains should be
removed if they are really unused, but this is left to another CL).

Original change's description:
> Reland "Exposes that the dSYM bundle contains relocation information"
>
> This is a reland of commit 6739edea3b867e783cfdef497beb73aba4060469
>
> The original CL was reverted because the path to the relocation yml
> file was incorrect in the outputs of the linker command as the file
> includes the extension of the generated binary (e.g. $foo.so.yml)
> but it was missing.
>
> This version correctly uses "{{output_extension}}" to include the
> output extension if necessary when generating the list of outputs.
>
> Original change's description:
> > [apple] Exposes that the dSYM bundle contains relocation information
> >
> > The structure of a dSYM bundle is the following:
> >
> >   $target.dSYM/
> >     Contents/
> >       Info.plist
> >       Resources/
> >         DWARF/
> >           $target
> >         Relocations/
> >           $arch/
> >             $target.yml
> >
> > Update the toolchain and build rules to list the missing Relocations.
> >
> > Bug: none
> > Change-Id: Ie4318253a1c7be6c2d235c8c92d76d014b6d8716
> > Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7003395
> > Reviewed-by: Mark Mentovai <mark@chromium.org>
> > Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
> > Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
> > Cr-Commit-Position: refs/heads/main@{#1526227}
>
> Bug: none
> Change-Id: Ie8e9608a18ada2aa14e387bc96cb22d08ad99435
> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7014513
> Commit-Queue: Mark Mentovai <mark@chromium.org>
> Auto-Submit: Sylvain Defresne <sdefresne@chromium.org>
> Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
> Reviewed-by: Mark Mentovai <mark@chromium.org>
> Cr-Commit-Position: refs/heads/main@{#1526307}

Bug: none
Change-Id: Id7dc3167597464a8d7e025db8ed0a50a06b3110e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/7013364
Reviewed-by: Mark Mentovai <mark@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1530041}
NOKEYCHECK=True
GitOrigin-RevId: 92aaeb64dc482d68dbb8060d5ce8cab1bafe2b42
1 file changed