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

Michael Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 31 14:53:16 PDT 2020


hliao added a comment.

In D77154#1953423 <https://reviews.llvm.org/D77154#1953423>, @MaskRay wrote:

> This seems fine. I have `-DCMAKE_EXE_LINKER_FLAGS=-Wl,--gdb-index -DCMAKE_SHARED_LINKER_FLAGS=-Wl,--gdb-index -DLLVM_USE_SPLIT_DWARF=On` in my long cmake command line. I am just wondering whether this new option will be discoverable.
>
> Some people don't use -DLLVM_USE_LINKER=lld, but use -DLLVM_ENABLE_LLD=On.


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.


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