[lld] [llvm] [LLVM][LTO] Factor out RTLib calls and allow them to be dropped (PR #98512)

Sam Clegg via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 11 12:58:23 PDT 2024


sbc100 wrote:

> Likely a combination of `--ffunction-sections` and `-Wl,--gc-sections` will remove the dead functions, but that doesn't stop `lld` from extracting it and forcing it through codegen, which adds over a second of link time as it stands if you include math definitions.

Ok that would explain it.   `-ffunction-sections` and `-Wl,--gc-sections` are both enabled by default for the Wasm target.    But if there are link time savings due to less codegen that would still benefit us.  Thanks.

https://github.com/llvm/llvm-project/pull/98512


More information about the llvm-commits mailing list