aboutsummaryrefslogtreecommitdiff
path: root/lld/COFF/LTO.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lld/COFF/LTO.cpp')
-rw-r--r--lld/COFF/LTO.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp
index 2fa3536db873..d117abf86f79 100644
--- a/lld/COFF/LTO.cpp
+++ b/lld/COFF/LTO.cpp
@@ -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.
@@ -84,6 +85,8 @@ static lto::Config createConfig() {
c.AlwaysEmitRegularLTOObj = !config->ltoObjPath.empty();
c.UseNewPM = config->ltoNewPassManager;
c.DebugPassManager = config->ltoDebugPassManager;
+ c.CSIRProfile = std::string(config->ltoCSProfileFile);
+ c.RunCSIRInstr = config->ltoCSProfileGenerate;
if (config->saveTemps)
checkError(c.addSaveTemps(std::string(config->outputFile) + ".",