mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Add an -mattr option to the gold plugin to support subtarget features in LTO
This adds support for an -mattr option to the gold plugin and to llvm-lto. This allows the caller to specify details of the subtarget architecture, like +aes, or +ssse3 on x86. Note that this requires a change to the include/llvm-c/lto.h interface: it adds a function lto_codegen_set_attr and it increments the version of the interface. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207279 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -143,6 +143,16 @@ int main(int argc, char **argv) {
|
||||
for (unsigned i = 0; i < KeptDSOSyms.size(); ++i)
|
||||
CodeGen.addMustPreserveSymbol(KeptDSOSyms[i].c_str());
|
||||
|
||||
std::string attrs;
|
||||
for (unsigned i = 0; i < MAttrs.size(); ++i) {
|
||||
if (i > 0)
|
||||
attrs.append(",");
|
||||
attrs.append(MAttrs[i]);
|
||||
}
|
||||
|
||||
if (!attrs.empty())
|
||||
CodeGen.setAttr(attrs.c_str());
|
||||
|
||||
if (!OutputFilename.empty()) {
|
||||
size_t len = 0;
|
||||
std::string ErrorInfo;
|
||||
|
Reference in New Issue
Block a user