diff options
author | Simon Atanasyan <satanasyan@mips.com> | 2012-04-06 19:15:24 +0000 |
---|---|---|
committer | Simon Atanasyan <satanasyan@mips.com> | 2012-04-06 19:15:24 +0000 |
commit | 5f0a1c12dacadd5a061ea5b57d51cf6798ae22a1 (patch) | |
tree | 8fbea58dbb6f752ba2e228ef8149898c93e18837 /lib/Driver/Tools.cpp | |
parent | f439e00c7055d2d51b88141f63ebfc893af10951 (diff) |
MIPS: Pass -EB/-EL argument to the assembler according to selected endian when compile for MIPS targets.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154195 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 4c4ab7bc98..8c4378c666 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -5032,6 +5032,12 @@ void linuxtools::Assemble::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("-march"); CmdArgs.push_back(CPUName); } + + if (getToolChain().getArch() == llvm::Triple::mips || + getToolChain().getArch() == llvm::Triple::mips64) + CmdArgs.push_back("-EB"); + else + CmdArgs.push_back("-EL"); } Args.AddAllArgValues(CmdArgs, options::OPT_Wa_COMMA, |