[PATCH] D62884: [lld] Explicitly ignore comdat groups when parsing LTO object

Sam Clegg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 19 12:37:11 PDT 2020


sbc100 added a comment.

In D62884#2044673 <https://reviews.llvm.org/D62884#2044673>, @christylee wrote:

> We are trying to migrate from gold to lld, and we found that when building with thinlto, lld does not de-duplicate `.debug_types`.  De-duplication is successful with monolithic lto.  Repro: clang `-flto=thin -fdebug-types-section -fuse-ld=lld -Wl,-plugin-opt=-generate-type-units`
>
> If we set `ignoreComdats=false` for lto builds, then the de-duplication is successful again.  Is the assumption "any symbols defined in the LTO object are by definition the ones we want in the final output" only true for monolithic lto?


You could be right here.  I'm don't understand thingLTO enough to know that answer to that question of the top of my head.  However the behavior before and after this change should be the same, since I believe they were being ignored before this change too.   Do you see any other side effects of settings this to false?


Repository:
  rL LLVM

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

https://reviews.llvm.org/D62884





More information about the llvm-commits mailing list