Issue |
129543
|
Summary |
[LLDB] Reduce the size of lldb-server binary (isolate plug-ins)
|
Labels |
lldb
|
Assignees |
|
Reporter |
slydiman
|
I'm trying to reduce the size of lldb-server binary.
The size of lldb-server binary for Aarch64 (release) is about 42MB.
I have analyzed the code and found a lot of x86, PDB, MIPS and Denwer related code.
Many "lldb plug-ins" are not plug-ins, but libraries used by other plug-ins.
See https://github.com/llvm/llvm-project/commit/ac1ea0d3da1ef620a392d2e22a38c03bd844383b
1. It is necessary to review and isolate plug-ins more accurately.
llvm-project/lldb/tools/lldb-server/SystemInitializerLLGS.cpp includes only necessary plug-ins, but it is not enough.
For example, llvm-project/lldb/source/Plugins/TypeSystem/Clang/TypeSystemClang.cpp uses PDB code in
`PDBASTParser *TypeSystemClang::GetPDBParser()` and `npdb::PdbAstBuilder *TypeSystemClang::GetNativePDBParser()`.
That's why Aarch64 lldb-server binary contains unwanted x86 and PDB code.
I'm trying to figure out how to disable some plug-ins (with loss of some functionality) to reduce the size of lldb-server binary. But they have a lot of cross-dependencies.
PlatformPOSIX::DoLoadImage() uses TypeSystemClang directly, etc.
2. A lot of unwanted code is used directly in the base LLVM code and cannot be disabled in lldb.
For example `ms_demangler` is used in llvm-project/llvm/lib/Demangle/Demangle.cpp
Currently I have no solution how to remove such unwanted code except by using local patches.
Any thoughts are welcome.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs