Reland "[lld-link] Enable addrsig table in COFF lto"
authorZequan Wu <zequanwu@google.com>
Thu, 29 Apr 2021 22:52:24 +0000 (15:52 -0700)
committerZequan Wu <zequanwu@google.com>
Thu, 29 Apr 2021 22:54:12 +0000 (15:54 -0700)
This reverts commit a78fa73bcf986cf5912d665ecd9620535f480607.

The commit cab48e2f0e00648ef0494ce114f4e00a3ded330f fixes the issue on eabd55b1b2c5e322c3b36cb44348f178692890c8.

lld/COFF/LTO.cpp

index a47f66e..d117abf 100644 (file)
@@ -62,6 +62,7 @@ static std::string getThinLTOOutputFile(StringRef path) {
 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.