diff options
| author | Yolanda Chen <yolanda.chen@intel.com> | 2021-08-11 13:22:36 +0800 |
|---|---|---|
| committer | Wang, Pengfei <pengfei.wang@intel.com> | 2021-08-11 14:43:26 +0800 |
| commit | 0cfb00a1c98f8ca3749b8d829b7301f397efa302 (patch) | |
| tree | d5d319ce4205c4039ce22d85c0d4659e79ede2bd /lld/COFF/LTO.cpp | |
| parent | 98e30a9b4704a49e8b12591ae3b307f9d80e4803 (diff) | |
| download | llvm-0cfb00a1c98f8ca3749b8d829b7301f397efa302.tar.gz llvm-0cfb00a1c98f8ca3749b8d829b7301f397efa302.tar.bz2 llvm-0cfb00a1c98f8ca3749b8d829b7301f397efa302.zip | |
[lld] Add lto-pgo-warn-mismatch option
When enable CSPGO for ThinLTO, there are profile cfg mismatch warnings that will cause lld-link errors (with /WX).
To disable it we have to use an internal "/mllvm:-no-pgo-warn-mismatch" option.
In contrast clang uses option ”-Wno-backend-plugin“ to avoid such warnings and gcc has an explicit "-Wno-coverage-mismatch" option.
Add this "lto-pgo-warn-mismatch" option to lld to help turn on/off the profile mismatch warnings explicitly when build with ThinLTO and CSPGO.
Reviewed By: tejohnson
Differential Revision: https://reviews.llvm.org/D104431
Diffstat (limited to 'lld/COFF/LTO.cpp')
| -rw-r--r-- | lld/COFF/LTO.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lld/COFF/LTO.cpp b/lld/COFF/LTO.cpp index d117abf86f79..6e38f53f2136 100644 --- a/lld/COFF/LTO.cpp +++ b/lld/COFF/LTO.cpp @@ -87,6 +87,7 @@ static lto::Config createConfig() { c.DebugPassManager = config->ltoDebugPassManager; c.CSIRProfile = std::string(config->ltoCSProfileFile); c.RunCSIRInstr = config->ltoCSProfileGenerate; + c.PGOWarnMismatch = config->ltoPGOWarnMismatch; if (config->saveTemps) checkError(c.addSaveTemps(std::string(config->outputFile) + ".", |
