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.
>
> Bug: 338009514
> Change-Id: Ifdf1c7023305fc5c417e1f50a33d5a9ae7e0acc7
> 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>

Bug: 338009514
Change-Id: Ie3157ab99b6fd78873dba3770fb03893bdd198ae
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>
7 files changed
tree: 41b2b140884d728c74e16eddc7dce1cab5aa718e
  1. .fx/
  2. .helix/
  3. boards/
  4. build/
  5. bundles/
  6. docs/
  7. examples/
  8. infra/
  9. products/
  10. scripts/
  11. sdk/
  12. src/
  13. third_party/
  14. tools/
  15. zircon/
  16. .clang-format
  17. .clang-tidy
  18. .editorconfig
  19. .git-blame-ignore-revs
  20. .gitattributes
  21. .gitignore
  22. .gitmodules
  23. .gn
  24. .ignore
  25. analysis_options.yaml
  26. AUTHORS
  27. BUILD.gn
  28. CODE_OF_CONDUCT.md
  29. CONTRIBUTING.md
  30. fuchsia.code-workspace
  31. LICENSE
  32. OWNERS
  33. PATENTS
  34. pyproject.toml
  35. pyrightconfig.json
  36. README.md
  37. rustfmt.toml
  38. shac.star
  39. shac.textproto
README.md

Fuchsia

What is Fuchsia?

Fuchsia is an open source, general purpose operating system supporting modern 64-bit Intel and ARM processors.

We expect everyone interacting with our project to respect our code of conduct.

Read more about Fuchsia's principles.

How can I build and run Fuchsia?

See Getting Started.

Where can I learn more about Fuchsia?

See fuchsia.dev.