Pass CPU string to LTO pipeline.
Previously an empty CPU string was passed to the LTO engine which
resulted in a generic CPU for which certain features like NOPL were
disabled. This fixes that.
Patch by Pratik Bhatu!
llvm-svn: 323801
diff --git a/lld/ELF/LTO.cpp b/lld/ELF/LTO.cpp
index 03628fa..3710bef 100644
--- a/lld/ELF/LTO.cpp
+++ b/lld/ELF/LTO.cpp
@@ -87,6 +87,7 @@
Conf.DisableVerify = Config->DisableVerify;
Conf.DiagHandler = diagnosticHandler;
Conf.OptLevel = Config->LTOO;
+ Conf.CPU = GetCPUStr();
// Set up a custom pipeline if we've been asked to.
Conf.OptPipeline = Config->LTONewPmPasses;