[lld] [LLD] [MinGW] Hook up --icf=safe to -opt:safeicf (PR #70037)
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 24 05:54:07 PDT 2023
mstorsjo wrote:
@rnk, back in 2017, https://reviews.llvm.org/D40019?id=122818#inline-349280, you wrote:
> I don't think LLD has support for safe ICF. Safe ICF leveraged certain x86_32 ELF relocations that COFF lacks, and failing that, relies on knowledge about the Itanium C++ name mangling rules. LLD doesn't implement anything like that.
As LLD/COFF now does have support for safe ICF since https://github.com/llvm/llvm-project/commit/5bdc5e7efda4100c4d11085c2da8f1fb932ccce4, I presume it's safe to use it for the MinGW target as well - as we have the addrsig information encoded in COFF object files these days as well, right? Even if LLD doesn't have any knowledge about the Itanium C++ name mangling (at this level).
https://github.com/llvm/llvm-project/pull/70037
More information about the llvm-commits
mailing list