[llvm-dev] LLD Command Line Length Error
Martin Storsjö via llvm-dev
llvm-dev at lists.llvm.org
Thu Aug 1 13:05:47 PDT 2019
On Tue, 30 Jul 2019, Reid Kleckner wrote:
> I think the bug is that clang won't use a response file unless it thinks the
> tool it is running supports them. The MinGW linker tool doesn't claim to
> support response files today. I think this would be a simple fix:
> $ git diff
> diff --git a/clang/lib/Driver/ToolChains/MinGW.h
> b/clang/lib/Driver/ToolChains/MinGW.h
> index 08298e910eb..41c466337b7 100644
> --- a/clang/lib/Driver/ToolChains/MinGW.h
> +++ b/clang/lib/Driver/ToolChains/MinGW.h
> @@ -34,7 +34,7 @@ public:
>
> class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
> public:
> - Linker(const ToolChain &TC) : Tool("MinGW::Linker", "linker", TC) {}
> + Linker(const ToolChain &TC) : Tool("MinGW::Linker", "linker", TC,
> RF_Full) {}
>
> bool hasIntegratedCPP() const override { return false; }
> bool isLinkJob() const override { return true; }
Such a change looks good to me; we should be handling response files
quite well these days so this should be safe.
Do you have time to make a proper patch out of this? Otherwise I can try
to pick it up in a while, but I'm a little short on time at the moment.
// Martin
More information about the llvm-dev
mailing list