Martin Storsjö via llvm-dev
2019-Aug-01 20:05 UTC
[llvm-dev] LLD Command Line Length Error
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
On Thu, Aug 1, 2019 at 1:05 PM Martin Storsjö <martin at martin.st> wrote:> 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. >I landed it in r367733. I couldn't figure out how to write a test for it because -### runs before response file expansion. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190802/65b78d86/attachment.html>
Martin Storsjö via llvm-dev
2019-Aug-03 19:30 UTC
[llvm-dev] LLD Command Line Length Error
On Fri, 2 Aug 2019, Reid Kleckner wrote:> On Thu, Aug 1, 2019 at 1:05 PM Martin Storsjö <martin at martin.st> wrote: > 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. > > > I landed it in r367733. I couldn't figure out how to write a test for it > because -### runs before response file expansion.Thanks! Yes, I guess making a test for this would be more effort than what makes sense. // Martin