Reapply "[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#… (#145959) (#146112)

Reapply "[NFC][DebugInfo][DWARF] Create new low-level dwarf library (#…
(#145959)
    
This reapplies cbf781f0bd, with fixes for
the shared-library build and the unconventional sanitizer-runtime build.

Original Description:

This is the culmination of a series of changes described in [1].
    
Although somewhat large by line count, it is almost entirely mechanical,
creating a new library in DebugInfo/DWARF/LowLevel. This new library has
very minimal dependencies, allowing it to be used from more places than
the normal DebugInfo/DWARF library--in particular from MC.
    
1.
https://discourse.llvm.org/t/rfc-debuginfo-dwarf-refactor-into-to-lower-and-higher-level-libraries/86665/2
This commit is contained in:
Sterling-Augustine
2025-06-27 11:05:49 -07:00
committed by GitHub
parent a4be46e0e5
commit 23f1ba3ee4
57 changed files with 893 additions and 801 deletions

View File

@@ -106,6 +106,7 @@ cc_library(
"//llvm:DWARFLinker",
"//llvm:DWP",
"//llvm:DebugInfoDWARF",
"//llvm:DebugInfoDWARFLowLevel",
"//llvm:Demangle",
"//llvm:JITLink",
"//llvm:MC",
@@ -296,6 +297,7 @@ cc_library(
"//llvm:BinaryFormat",
"//llvm:CodeGen",
"//llvm:DebugInfoDWARF",
"//llvm:DebugInfoDWARFLowLevel",
"//llvm:Demangle",
"//llvm:ExecutionEngine",
"//llvm:MC",

View File

@@ -493,6 +493,7 @@ cc_library(
":DebugInfo",
":DebugInfoCodeView",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":DebugInfoPDB",
":Demangle",
":MC",
@@ -572,6 +573,7 @@ cc_library(
deps = [
":BinaryFormat",
":DebugInfo",
":DebugInfoDWARFLowLevel",
":MC",
":Object",
":Support",
@@ -579,6 +581,20 @@ cc_library(
],
)
cc_library(
name = "DebugInfoDWARFLowLevel",
srcs = glob([
"lib/DebugInfo/DWARF/LowLevel/*.cpp",
]),
hdrs = glob(["include/llvm/DebugInfo/DWARF/LowLevel/*.h"]),
copts = llvm_copts,
deps = [
":BinaryFormat",
":Support",
":TargetParser",
],
)
cc_library(
name = "DebugInfoGSYM",
srcs = glob([
@@ -1163,6 +1179,7 @@ cc_library(
":Core",
":DebugInfo",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":Demangle",
":Object",
":Support",
@@ -2090,6 +2107,7 @@ cc_library(
":Core",
":DebugInfoCodeView",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":IPO",
":IRPrinter",
":Instrumentation",
@@ -3231,6 +3249,7 @@ cc_library(
":CodeGenTypes",
":DWARFLinkerBase",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":MC",
":Support",
":Target",
@@ -3249,6 +3268,7 @@ cc_library(
":BinaryFormat",
":CodeGen",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":Support",
":Target",
],
@@ -3549,6 +3569,7 @@ cc_library(
":DWARFLinkerParallel",
":DebugInfo",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":DsymutilTableGen",
":MC",
":Object",
@@ -3966,6 +3987,7 @@ cc_binary(
":BinaryFormat",
":DebugInfo",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":MC",
":Object",
":Support",
@@ -3997,6 +4019,7 @@ cc_binary(
":DWARFLinker",
":DWARFLinkerParallel",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":DwarfutilOptionsTableGen",
":MC",
":ObjCopy",
@@ -4614,6 +4637,7 @@ cc_library(
":DebugInfo",
":DebugInfoBTF",
":DebugInfoDWARF",
":DebugInfoDWARFLowLevel",
":Debuginfod",
":Demangle",
":MC",