diff options
author | Simon Atanasyan <satanasyan@mips.com> | 2012-08-27 20:55:56 +0000 |
---|---|---|
committer | Simon Atanasyan <satanasyan@mips.com> | 2012-08-27 20:55:56 +0000 |
commit | 9804b761a9743c8248864e94018e4dc26577d471 (patch) | |
tree | 2a18d4fde2a24c926830e86c9817b884ee145996 /lib/Driver/Tools.cpp | |
parent | da083b2ce8db27ce6e508cb77cb12c0fc8b7cad9 (diff) |
MIPS: Use -G option to specify MIPS section threshold. Translate it
to the -mllvm -mips-ssection-threshold=<value> pair and pass to the frontend.
The patch suggested by Carl Norum.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@162697 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Driver/Tools.cpp')
-rw-r--r-- | lib/Driver/Tools.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 11429131d7..ccfa69a739 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -941,6 +941,13 @@ void Clang::AddMIPSTargetArgs(const ArgList &Args, AddTargetFeature(Args, CmdArgs, options::OPT_mdspr2, options::OPT_mno_dspr2, "dspr2"); + + if (Arg *A = Args.getLastArg(options::OPT_G)) { + StringRef v = A->getValue(Args); + CmdArgs.push_back("-mllvm"); + CmdArgs.push_back(Args.MakeArgString("-mips-ssection-threshold=" + v)); + A->claim(); + } } /// getPPCTargetCPU - Get the (LLVM) name of the PowerPC cpu we are targeting. |