aboutsummaryrefslogtreecommitdiff
path: root/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorSimon Atanasyan <satanasyan@mips.com>2012-07-05 14:19:39 +0000
committerSimon Atanasyan <satanasyan@mips.com>2012-07-05 14:19:39 +0000
commit0b273efa37a38deab77dadf72540c9c07c63f8cf (patch)
tree2cc5322b72089bf0c3438136e46b5b887622fb3e /lib/Driver/Tools.cpp
parent125aa1fcfa01d01a0becf91ebbfd0e5705f6969d (diff)
MIPS: Add -mips16 / -mno-mips16 command line support.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159747 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r--lib/Driver/Tools.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp
index a5e2e401e2..1be4659f61 100644
--- a/lib/Driver/Tools.cpp
+++ b/lib/Driver/Tools.cpp
@@ -919,6 +919,15 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args,
CmdArgs.push_back("-mfloat-abi");
CmdArgs.push_back("hard");
}
+
+ if (Arg *A = Args.getLastArg(options::OPT_mips16,
+ options::OPT_mno_mips16)) {
+ CmdArgs.push_back("-target-feature");
+ if (A->getOption().matches(options::OPT_mips16))
+ CmdArgs.push_back("+mips16");
+ else
+ CmdArgs.push_back("-mips16");
+ }
}
/// getPPCTargetCPU - Get the (LLVM) name of the PowerPC cpu we are targeting.