commit | a8741f9d2136149adc9ee102401b704d3c2c563b | [log] [tgz] |
---|---|---|
author | Zijie He <zijiehe@google.com> | Wed Mar 26 10:32:37 2025 -0700 |
committer | CQ Bot <fuchsia-internal-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Mar 26 10:32:37 2025 -0700 |
tree | 41b2b140884d728c74e16eddc7dce1cab5aa718e | |
parent | 0dd817eef5a3d96f6d7aa8829ded00bb9c88b890 [diff] |
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>
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.
See Getting Started.
See fuchsia.dev.