[EABI] Add Clang support for -meabi flag
The -meabi flag to control LLVM EABI version. Without '-meabi' or with '-meabi default' imply LLVM triple default. With '-meabi gnu' sets EABI GNU. With '-meabi 4' or '-meabi 5' set EABI version 4 and 5 respectively. A similar patch was introduced in LLVM. Patch by Vinicius Tinti. llvm-svn: 252463
This commit is contained in:
@@ -515,6 +515,14 @@ TargetMachine *EmitAssemblyHelper::CreateTargetMachine(bool MustCreateTM) {
|
||||
Options.UseInitArray = CodeGenOpts.UseInitArray;
|
||||
Options.DisableIntegratedAS = CodeGenOpts.DisableIntegratedAS;
|
||||
Options.CompressDebugSections = CodeGenOpts.CompressDebugSections;
|
||||
|
||||
// Set EABI version.
|
||||
Options.EABIVersion = llvm::StringSwitch<llvm::EABI>(CodeGenOpts.EABIVersion)
|
||||
.Case("4", llvm::EABI::EABI4)
|
||||
.Case("5", llvm::EABI::EABI5)
|
||||
.Case("gnu", llvm::EABI::GNU)
|
||||
.Default(llvm::EABI::Default);
|
||||
|
||||
Options.LessPreciseFPMADOption = CodeGenOpts.LessPreciseFPMAD;
|
||||
Options.NoInfsFPMath = CodeGenOpts.NoInfsFPMath;
|
||||
Options.NoNaNsFPMath = CodeGenOpts.NoNaNsFPMath;
|
||||
|
||||
Reference in New Issue
Block a user