diff options
author | sbruno <sbruno@FreeBSD.org> | 2015-01-20 17:00:28 +0000 |
---|---|---|
committer | sbruno <sbruno@FreeBSD.org> | 2015-01-20 17:00:28 +0000 |
commit | 667029aa90f1a067a6a2ef0a0cc5bdffe58edb8e (patch) | |
tree | 08149d0ebb143147a723c4cb425e7624908821e6 /contrib/llvm/tools/clang/lib/Driver | |
parent | c8c1bd7911b30045e7d4cd9b70000bb68cf7b3f8 (diff) | |
download | FreeBSD-src-667029aa90f1a067a6a2ef0a0cc5bdffe58edb8e.zip FreeBSD-src-667029aa90f1a067a6a2ef0a0cc5bdffe58edb8e.tar.gz |
Allow clang to be built for mips/mips64 backend types by adding our mips
triple ids
This only allows testing and does not change the defaults for mips/mips64.
They still build/use gcc by default.
Differential Revision: https://reviews.freebsd.org/D1190
Reviewed by: dim
Diffstat (limited to 'contrib/llvm/tools/clang/lib/Driver')
-rw-r--r-- | contrib/llvm/tools/clang/lib/Driver/Tools.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp index 89db52e..f33fb32 100644 --- a/contrib/llvm/tools/clang/lib/Driver/Tools.cpp +++ b/contrib/llvm/tools/clang/lib/Driver/Tools.cpp @@ -6587,6 +6587,17 @@ void freebsd::Link::ConstructJob(Compilation &C, const JobAction &JA, CmdArgs.push_back("elf32ppc_fbsd"); } + if (Arg *A = Args.getLastArg(options::OPT_G)) { + if (ToolChain.getArch() == llvm::Triple::mips || + ToolChain.getArch() == llvm::Triple::mipsel || + ToolChain.getArch() == llvm::Triple::mips64 || + ToolChain.getArch() == llvm::Triple::mips64el) { + StringRef v = A->getValue(); + CmdArgs.push_back(Args.MakeArgString("-G" + v)); + A->claim(); + } + } + if (Output.isFilename()) { CmdArgs.push_back("-o"); CmdArgs.push_back(Output.getFilename()); |