diff options
author | Renato Golin <renato.golin@linaro.org> | 2015-11-09 12:40:41 +0000 |
---|---|---|
committer | Renato Golin <renato.golin@linaro.org> | 2015-11-09 12:40:41 +0000 |
commit | 4854d80c39270b9cd1e72b3e399045fbab768b6c (patch) | |
tree | 18859611b368f31a9afad3dd7f3dbcf5f6c458cc /clang/lib/CodeGen | |
parent | 6d435f12f0ef0be987476a3e18215fbcd182bcd1 (diff) | |
download | bcm5719-llvm-4854d80c39270b9cd1e72b3e399045fbab768b6c.tar.gz bcm5719-llvm-4854d80c39270b9cd1e72b3e399045fbab768b6c.zip |
[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
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index a1f80d7e68a..b2a65c6eacb 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -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; |