[PATCH] D77154: [cmake] Add LLVM_USE_GDB_INDEX option for gold/lld linkers

Dominic Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 15:27:35 PDT 2020


ddcc added a subscriber: smeenai.
ddcc added a comment.

In D77154#1953470 <https://reviews.llvm.org/D77154#1953470>, @hliao wrote:

> The same patch posted previously, https://reviews.llvm.org/D58628


Oops, I saw your patch to `LLVM_USE_SPLIT_DWARF` that landed, but missed that one.

In D77154#1953480 <https://reviews.llvm.org/D77154#1953480>, @hliao wrote:

> As I mentioned in https://reviews.llvm.org/D58628, if your system's default linker doesn't recognize `--gdb-index`, adding option into CMAKE_EXE_LINKER_FLAGS fails the make detection stage, where the default linker is used.


It seems like `-fuse-ld=gold/lld` would be the simplest way forward? Do you plan to revise your patch to address that, lld, and @smeenai comment about `-ggnu-pubnames`? My only other feedback would be to update the docs, since even `LLVM_USE_SPLIT_DWARF` isn't currently listed, and that incorporating objcopy would make things more complicated.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77154





More information about the llvm-commits mailing list