[lld] [lld][ELF] Add --why-live flag (inspired by Mach-O) (PR #127112)
Daniel Thornburgh via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 19 10:45:55 PST 2025
mysterymath wrote:
> I think we need Mach-O style `template <bool RecordWhyLive>` to prevent overhead with the regular --gc-sections code path.
>
> https://reviews.llvm.org/D69607 is a previous attempt adding the option.
It seems prudent to collect some evidence that this might be a performance problem before moving to a less readable implementation. I'm planning to do a simple link of clang with -ffunction-sections and -fdata-sections; that should provide some cursory evidence. If that's not sufficient, I'm also totally okay with this patch being summarily reverted in case a regression occurs in something larger. Especially since it should be entirely mechanical to move this to use `template <bool RecordWhyLive>`.
https://github.com/llvm/llvm-project/pull/127112
More information about the llvm-commits
mailing list