[PATCH] use response files to pass arguments to the linker, fixes PR 15171

Rafael EspĂ­ndola rafael.espindola at gmail.com
Fri Mar 15 11:01:25 PDT 2013

On 14 March 2013 14:51, Nathan Froyd <froydnj at mozilla.com> wrote:
> Hi,


> The attached patch fixes this issue by simply using a response file all the time for passing arguments to the linker.

This is fairly cumbersome for testing the driver or just seeing what
is going on when passing -v to it. We probably need something less

> ...or using a response file if the size of the arguments exceeds some limit.

I think this is the correct solution.

> ... and I didn't go with the latter because any cross-platform limit is going to be necessarily conservative and you might as well just use a response file all the time at that point.

The way we handle these cases in llvm/clang is via llvm/lib/Support.
We should add code there to check the maximum command line size in the
different operating systems we use. On linux and OSX it looks like
this is just sysconf(_SC_ARG_MAX) for example.

> -Nathan


More information about the cfe-commits mailing list