Skip to content

Commit

Permalink
Removed setting debug info identity API]
Browse files Browse the repository at this point in the history
Summary: As I removed all usages no one left who needs it

Differential Revision: D68817856

fbshipit-source-id: d1351e660fdf31d4266a62995dc938897e5be82e
  • Loading branch information
Nikita Patskov authored and facebook-github-bot committed Jan 29, 2025
1 parent 4d0b581 commit f23ce83
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions prelude/debugging/labels.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -21,44 +21,6 @@ DBG_INFO_EXEC = "dbg:info:exec"
# specific information that help debugging tools to properly configure a debugger. (Support for any given language/rule needs to be implemented in fdb.bxl)
DBG_INFO_REF = "dbg:info:ref"

# Certain dependency graphs may have convoluted setup:
# ┌───────────────────────────┐
# │ //my:binary │
# └───────────────────────────┘
# / \
# / \
# ┌───────────────────────────┐ ┌───────────────────────────┐
# │ //third-party:absl │ │ //third-party:absl_base │
# └───────────────────────────┘ └───────────────────────────┘
# │ / │
# │ / │
# ┌───────────────────────────────┐ ┌─────────────────────────────────┐
# │ //third-party:absl_baseFbcode │ │ //third-party:absl_helperFbcode │
# └───────────────────────────────┘ └─────────────────────────────────┘
#
# `:absl_base` and `:absl_baseFbcode` are mirrored targets with the same
# source files where "Fbcode" suffixed target is generated. If `absl_base`
# defines `preferred_linkage = "static"` then duplicated `.o` files are
# being linked together. That works fine because we pass `--as-needed` and
# linker knows how to drop duplicated symbols. With "packed" or "merged"
# split-dwarf we then producing `.dwo` file from executable and it works fine.
#
# The problem arises with "unpacked" (or "split") split-dwarf that produces
# `.dwo` files that are packed together via `llvm-dwp` tool. Unfortunately,
# `llvm-dwp` doesn't know how to deal with duplicates and always fail hard.
#
# As a workaround, we marking debug symbols in `absl_base` and `absl_baseFbcode`
# with the same `absl_base` identity and filtering out duplicates ourselves
# before passing list of `.dwo` files to `llvm-dwp` tool.
#
# llvm-20 seems to produce different debug units with different IDs by filepahts
# and doesn't have this issue. We may drop this workaround once llvm-20 is widely used.
#
DBG_INFO_IDENTITY = "dbg:info:identity"

def dbg_info_identity(target_label: str) -> list[str]:
return ["{}={}".format(DBG_INFO_IDENTITY, target_label)]

def dbg_info_exec(target_label) -> list[str]:
return ["{}={}".format(DBG_INFO_EXEC, target_label)]

Expand Down

0 comments on commit f23ce83

Please sign in to comment.