Files
clang-p2996/bolt/lib/Rewrite/CMakeLists.txt
Sterling-Augustine cbf781f0bd [NFC][DebugInfo][DWARF] Create new low-level dwarf library (#145081)
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.
    
I am happy to put it in another location, or to structure it differently
if that makes sense. Some have suggested in BinaryFormat, but it is not
a great fit there. But if that makes more sense to the reviewers, I can
do that.
 
Another possibility would be to use pass-through headers to allow
clients who don't care to depend only on DebugInfo/DWARF. This would be
a much less invasive change, and perhaps easier for clients. But also a
system that hides details.

Either way, I'm open.

1.
https://discourse.llvm.org/t/rfc-debuginfo-dwarf-refactor-into-to-lower-and-higher-level-libraries/86665/2
2025-06-26 11:23:46 -07:00

50 lines
938 B
CMake

set(LLVM_LINK_COMPONENTS
Core
DebugInfoDWARF
DebugInfoDWARFLowLevel
JITLink
MC
Object
Support
DWARFLinker
DWARFLinkerClassic
AsmPrinter
TargetParser
)
add_llvm_library(LLVMBOLTRewrite
BinaryPassManager.cpp
BoltDiff.cpp
DWARFRewriter.cpp
ExecutableFileMemoryManager.cpp
JITLinkLinker.cpp
LinuxKernelRewriter.cpp
MachORewriteInstance.cpp
MetadataManager.cpp
BuildIDRewriter.cpp
PseudoProbeRewriter.cpp
RewriteInstance.cpp
SDTRewriter.cpp
NO_EXPORT
DISABLE_LLVM_LINK_LLVM_DYLIB
LINK_LIBS
${LLVM_PTHREAD_LIB}
)
target_link_libraries(LLVMBOLTRewrite
PRIVATE
LLVMBOLTCore
LLVMBOLTPasses
LLVMBOLTProfile
LLVMBOLTRuntimeLibs
LLVMBOLTUtils
)
foreach (tgt ${BOLT_TARGETS_TO_BUILD})
target_link_libraries(LLVMBOLTRewrite PRIVATE LLVMBOLTTarget${tgt})
string(TOUPPER "${tgt}" upper)
target_compile_definitions(LLVMBOLTRewrite PRIVATE ${upper}_AVAILABLE)
endforeach()