[PATCH] D53446: Set MAttrs in LTO mode

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 1 13:05:16 PDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rL345884: Set MAttrs in LTO mode (authored by MaskRay, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D53446?vs=172185&id=172214#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D53446

Files:
  lld/trunk/COFF/LTO.cpp
  lld/trunk/Common/TargetOptionsCommandFlags.cpp
  lld/trunk/ELF/LTO.cpp
  lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
  lld/trunk/wasm/LTO.cpp


Index: lld/trunk/Common/TargetOptionsCommandFlags.cpp
===================================================================
--- lld/trunk/Common/TargetOptionsCommandFlags.cpp
+++ lld/trunk/Common/TargetOptionsCommandFlags.cpp
@@ -32,3 +32,4 @@
 }
 
 std::string lld::GetCPUStr() { return ::getCPUStr(); }
+std::vector<std::string> lld::GetMAttrs() { return ::MAttrs; }
Index: lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
===================================================================
--- lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
+++ lld/trunk/include/lld/Common/TargetOptionsCommandFlags.h
@@ -19,4 +19,5 @@
 llvm::TargetOptions InitTargetOptionsFromCodeGenFlags();
 llvm::Optional<llvm::CodeModel::Model> GetCodeModelFromCMModel();
 std::string GetCPUStr();
+std::vector<std::string> GetMAttrs();
 }
Index: lld/trunk/COFF/LTO.cpp
===================================================================
--- lld/trunk/COFF/LTO.cpp
+++ lld/trunk/COFF/LTO.cpp
@@ -60,6 +60,8 @@
   C.DisableVerify = true;
   C.DiagHandler = diagnosticHandler;
   C.OptLevel = Config->LTOO;
+  C.MAttrs = GetMAttrs();
+
   if (Config->SaveTemps)
     checkError(C.addSaveTemps(std::string(Config->OutputFile) + ".",
                               /*UseInputModulePath*/ true));
Index: lld/trunk/wasm/LTO.cpp
===================================================================
--- lld/trunk/wasm/LTO.cpp
+++ lld/trunk/wasm/LTO.cpp
@@ -55,6 +55,7 @@
   C.DisableVerify = Config->DisableVerify;
   C.DiagHandler = diagnosticHandler;
   C.OptLevel = Config->LTOO;
+  C.MAttrs = GetMAttrs();
 
   if (Config->SaveTemps)
     checkError(C.addSaveTemps(Config->OutputFile.str() + ".",
Index: lld/trunk/ELF/LTO.cpp
===================================================================
--- lld/trunk/ELF/LTO.cpp
+++ lld/trunk/ELF/LTO.cpp
@@ -88,6 +88,7 @@
   C.DiagHandler = diagnosticHandler;
   C.OptLevel = Config->LTOO;
   C.CPU = GetCPUStr();
+  C.MAttrs = GetMAttrs();
 
   // Set up a custom pipeline if we've been asked to.
   C.OptPipeline = Config->LTONewPmPasses;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53446.172214.patch
Type: text/x-patch
Size: 2070 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/76b46e01/attachment.bin>


More information about the llvm-commits mailing list