[lld-link] Enable addrsig table in COFF lto
This allow safe-icf mode to work when linking with LTO.
Differential Revision: https://reviews.llvm.org/D99613
GitOrigin-RevId: eabd55b1b2c5e322c3b36cb44348f178692890c8
diff --git a/COFF/LTO.cpp b/COFF/LTO.cpp
index a47f66e..d117abf 100644
--- a/COFF/LTO.cpp
+++ b/COFF/LTO.cpp
@@ -62,6 +62,7 @@
static lto::Config createConfig() {
lto::Config c;
c.Options = initTargetOptionsFromCodeGenFlags();
+ c.Options.EmitAddrsig = true;
// Always emit a section per function/datum with LTO. LLVM LTO should get most
// of the benefit of linker GC, but there are still opportunities for ICF.