diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-16 19:01:17 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-06-16 19:01:17 +0000 |
commit | 1ed1a594e9befc91ebf00d81b41a2fdfab862657 (patch) | |
tree | 0aca45893ced0493bb2c8bf5e87a878e61d07431 /lib/Driver/Tools.cpp | |
parent | d4266629ed62e3a0de5e2cb2dfb8e806f9bdc5f6 (diff) |
Change the test for which ABI/CC to use on ARM to be base on the environment
(the last argument of the triple).
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106131 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 0a88d9f979..ae197fbeba 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -394,20 +394,13 @@ void Clang::AddARMTargetArgs(const ArgList &Args, ABIName = A->getValue(Args); } else { // Select the default based on the platform. - switch (getToolChain().getTriple().getOS()) { - // FIXME: Is this right for non-Darwin and non-Linux? - default: + llvm::StringRef env = getToolChain().getTriple().getEnvironmentName(); + if (env == "gnueabi") + ABIName = "aapcs-linux"; + else if (env == "eabi") ABIName = "aapcs"; - break; - - case llvm::Triple::Darwin: + else ABIName = "apcs-gnu"; - break; - - case llvm::Triple::Linux: - ABIName = "aapcs-linux"; - break; - } } CmdArgs.push_back("-target-abi"); CmdArgs.push_back(ABIName); |