[lldb-dev] building only lldb with debug symbols

Jim Ingham via lldb-dev lldb-dev at lists.llvm.org
Thu Jun 28 09:56:07 PDT 2018

If you are on macOS, then the Xcode build has a "Debug" configuration which builds clang/llvm Release+asserts with no debug info, and lldb at -O0 with debug info.


> On Jun 28, 2018, at 2:58 AM, Pavel Labath via lldb-dev <lldb-dev at lists.llvm.org> wrote:
> On Thu, 28 Jun 2018 at 04:34, Adrian Harris via lldb-dev
> <lldb-dev at lists.llvm.org> wrote:
>> Hi Everyone,
>> I'm writing a gdb-server for a new architecture and need to be able to debug lldb to track down issues. Unfortunately disk space is tight here and the llvm debug build consumes north of 40Gb with debug symbols. Is there any way to build *only* lldb with debug symbols (and no optimization)?
> Hi Adrian,
> This is a somewhat non-standard configuration, but there are a couple
> of ways you could achieve that. A couple which come to mind are:
> - If you're fine with hacking the cmake files then you could just
> insert something like
> into the root llvm CMakeLists.txt
> and then add
> to lldb's CMakeLists.txt
> - If you want a solution which does not involve modifying the cmake
> files, you could build llvm and lldb separately. The llvm could be
> built with -g0 (or even in release mode if you really want) and then
> the stanalone lldb build would be -g.
> - You can also try building with -gsplit-dwarf
> (LLVM_USE_SPLIT_DWARF=On) to see if that saves enough space for things
> to work for you.
> pl
> _______________________________________________
> lldb-dev mailing list
> lldb-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

More information about the lldb-dev mailing list