mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 06:25:18 +00:00
Make it possible to set the cpu used for codegen.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110759 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -119,6 +119,11 @@ bool LTOCodeGenerator::setCodePICModel(lto_codegen_model model,
|
||||
return true;
|
||||
}
|
||||
|
||||
void LTOCodeGenerator::setCpu(const char* mCpu)
|
||||
{
|
||||
_mCpu = mCpu;
|
||||
}
|
||||
|
||||
void LTOCodeGenerator::setAssemblerPath(const char* path)
|
||||
{
|
||||
if ( _assemblerPath )
|
||||
@@ -314,7 +319,7 @@ bool LTOCodeGenerator::determineTarget(std::string& errMsg)
|
||||
|
||||
// construct LTModule, hand over ownership of module and target
|
||||
SubtargetFeatures Features;
|
||||
Features.getDefaultSubtargetFeatures("" /* cpu */, llvm::Triple(Triple));
|
||||
Features.getDefaultSubtargetFeatures(_mCpu, llvm::Triple(Triple));
|
||||
std::string FeatureStr = Features.getString();
|
||||
_target = march->createTargetMachine(Triple, FeatureStr);
|
||||
}
|
||||
|
Reference in New Issue
Block a user