[lld] [lld][ELF] Add --print-relax-stats= to emit linker relaxation statistics (PR #193631)

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 22 22:12:10 PDT 2026


https://github.com/MaskRay requested changes to this pull request.

While I appreciate the proposal, this feels like a specialized feature that targets a very narrow audience of a small set of toolchain developers at a small set of organizations.
Given our focus on the general user base, I suggest handling this via external scripts that parse --emit-relocs output.

>From a technical perspective, relocation scanning is already a bottle neck and we cannot afford making it slower.
Expanding `Relocation` from 32 bytes to 40 bytes (due to padding) is also unacceptable.

lld should not pull in llvm/Support/JSON.h, a non-trivial dependency.


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


More information about the llvm-commits mailing list