[PATCH] D75425: [docs] Added solutions to slow build under common problems

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 2 17:14:48 PST 2020


dblaikie added a comment.

In D75425#1901038 <https://reviews.llvm.org/D75425#1901038>, @nhaehnle wrote:

> In D75425#1900044 <https://reviews.llvm.org/D75425#1900044>, @Meinersbur wrote:
>
> > - Use ninja instead of make
> > - BUILD_SHARED_LIBS=ON
>
>
> Absolutely, though this should also mention the dynamic library build without BUILD_SHARED_LIBS -- some downstream uses of LLVM have a hard time with BUILD_SHARED_LIBS.
>
> > - Separate debug symbols file (`-gsplit-dwarf`)
>
> There's a CMake option for that -- LLVM_USE_SPLIT_DWARF.
>
> Also worth mentioning is generating the gdb-index, which makes a **ridiculous** difference for debugging.


FWIW you actually /have/ to use gdb-index when using split DWARF with gdb, so far as I know/last I checked. (gdb will assume there's an index, query a trivial/empty one, and just stop/not go searching for things after the failed lookup). It'd be good if someone could fix the LLVM_USE_SPLIT_DWARF to add the linker flag (-Wl,--gdb-index). I /think/ -gsplit-dwarf when targeting gdb already implies -ggnu-pubnames which are needed to build the index in the linker (unless the linker is going to parse the DWARF manually, which is super slow/not great).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D75425/new/

https://reviews.llvm.org/D75425





More information about the llvm-commits mailing list