[roll] Roll fuchsia Reland "[idk] Generate deterministic paths for sysroot debug symbols"

This reverts commit a8741f9d2136149adc9ee102401b704d3c2c563b.

Reason for revert: The Chromium breakage is addressed.

Original change's description:
> Revert "[idk] Generate deterministic paths for sysroot debug symbols"
>
> This reverts commit 3b9498690b9937ffcc2d4978fe4f5a12f480efae.
>
> Reason for revert: break chromium
>
> Original change's description:
> > [idk] Generate deterministic paths for sysroot debug symbols
> >
> > Use paths like `arch/x64/sysroot/debug/libc.so` instead of
> > `.build-id/aa/BBBBBBB.debug` to store the debug symbols for
> > sysroot prebuilt libraries.
> >
> > There is no .build-id/ directory in the IDK after this change,
> > since prebuilt packages which contain ELF binaries never
> > provide debug symbols.
> >
> > The change also ensures that the two lists at
> > `versions.$arch.{debug_libs,dist_libs}` are properly parallel,
> > which allows exposing each library using fuchsia_unstripped_binary()
> > instead of fuchsia_package_resources_group(). In particular
> > the @fuchsia_sdk//pkg/sysroot/x64:dist target is now an alias
> > using a select() statement to find the right target based on
> > the current build configuration.
> >
> > In other words, before the CL @fuchsia_sdk//pkg/sysroot/x64/BUILD.bazel
> > looked like:
> >
> > ```
> > fuchsia_package_resource_group(
> >     name = "dist",
> >     srcs = select({
> >         "@fuchsia_clang//:novariant": ["//:arch/x64/sysroot/dist/lib/ld.so.1"],
> >         "@fuchsia_clang//:asan_variant": ["//:arch/x64/sysroot/dist/lib/asan/ld.so.1"],
> >     }),
> >     dest = "lib",
> >     strip_prefix = "arch/x64/sysroot/dist/lib/",
> >     target_compatible_with = COMPATIBILITY.FUCHSIA_CONDITION,
> > )
> > ```
> >
> > After the CL, it looks like:
> >
> > ```
> > alias(
> >     name = "dist",
> >     actual = select({
> >         "@fuchsia_clang//:novariant": ":dist.novariant",
> >         "@fuchsia_clang//:asan_variant": ":dist.asan",
> >     }),
> > )
> >
> > fuchsia_unstripped_binary(
> >     name = "dist.novariant",
> >     dest = "lib/ld.so.1",
> >     stripped_file = "//:arch/x64/sysroot/dist/lib/ld.so.1",
> >     target_compatible_with = COMPATIBILITY.FUCHSIA_CONDITION,
> >     unstripped_file = "//:arch/x64/sysroot/debug/libc.so",
> > )
> >
> > fuchsia_unstripped_binary(
> >     name = "dist.asan",
> >     dest = "lib/asan/ld.so.1",
> >     stripped_file = "//:arch/x64/sysroot/dist/lib/asan/ld.so.1",
> >     target_compatible_with = COMPATIBILITY.FUCHSIA_CONDITION,
> >     unstripped_file = "//:arch/x64/sysroot/debug/asan/libc.so",
> > )
> > ```
> >
> > Because a single select() statement is better than 3 :)
> >
> > + Fix a generate_sdk_build_rules.bzl typo when creating the
> >   @fuchsia_sdk//.build-id/empty file.
> >
> > + Fix a bug in fuchsia_rust.bzl which always packaged the
> >   *unstripped* binary into Fuchsia packages, instead of
> >   the stripped one. When building //build/bazel/examples/hello_rust,
> >   the installed binary goes from 3 MiB to 700 kiB.
> >
> > Original-Bug: 338009514
> > Change-Id: Ifdf1c7023305fc5c417e1f50a33d5a9ae7e0acc7
> > Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1055901
> > Reviewed-by: Jiaming Li <lijiaming@google.com>
> > Reviewed-by: David Fang <fangism@google.com>
> > Commit-Queue: David Turner <digit@google.com>
> > Reviewed-by: David Dorwin <ddorwin@google.com>
>
> Original-Bug: 338009514
> Change-Id: Ie3157ab99b6fd78873dba3770fb03893bdd198ae
> Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1236817
> Reviewed-by: Zijie He <zijiehe@google.com>
> Fuchsia-Auto-Submit: Zijie He <zijiehe@google.com>
> Commit-Queue: Jiaming Li <lijiaming@google.com>
> Owners-Override: James Robinson <jamesr@google.com>
> Commit-Queue: Zijie He <zijiehe@google.com>

Original-Bug: 338009514
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1246824
Original-Revision: 006c924f5148aaa7daa96913a9708f6737b1453f
GitOrigin-RevId: fd8ae3a973dd9c248cd97ac84c60d254a2be5244
Change-Id: I111564cfc14e7fbdf5d4d1dde2222f5300cd339b
1 file changed
tree: a57ffa9b2939e690b30791357425aa57f2382279
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.