[PATCH] D53446: Set MAttrs in LTO mode
Yin Ma via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 1 11:13:12 PDT 2018
yinma updated this revision to Diff 172185.
https://reviews.llvm.org/D53446
Files:
COFF/LTO.cpp
Common/TargetOptionsCommandFlags.cpp
ELF/LTO.cpp
include/lld/Common/TargetOptionsCommandFlags.h
wasm/LTO.cpp
Index: wasm/LTO.cpp
===================================================================
--- wasm/LTO.cpp
+++ 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: include/lld/Common/TargetOptionsCommandFlags.h
===================================================================
--- include/lld/Common/TargetOptionsCommandFlags.h
+++ 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: ELF/LTO.cpp
===================================================================
--- ELF/LTO.cpp
+++ 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;
Index: Common/TargetOptionsCommandFlags.cpp
===================================================================
--- Common/TargetOptionsCommandFlags.cpp
+++ Common/TargetOptionsCommandFlags.cpp
@@ -32,3 +32,4 @@
}
std::string lld::GetCPUStr() { return ::getCPUStr(); }
+std::vector<std::string> lld::GetMAttrs() { return ::MAttrs; }
Index: COFF/LTO.cpp
===================================================================
--- COFF/LTO.cpp
+++ 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));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53446.172185.patch
Type: text/x-patch
Size: 1920 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181101/575a9a9c/attachment.bin>
More information about the llvm-commits
mailing list