[PATCH] Driver: add support for linker file lists

Hans Wennborg hans at chromium.org
Wed Jun 11 18:22:16 PDT 2014


On Wed, Jun 11, 2014 at 5:45 PM, Alp Toker <alp at nuanti.com> wrote:
>
> On 12/06/2014 02:01, Reid Kleckner wrote:
>>
>> This is a general problem: any subcommand we execute may overflow the
>> system command line length limit.  I'd rather solve it transparently for
>> -cc1 as well as linker invocations by exposing a command line length
>> estimate from Support and then estimating our command line length in the
>> driver before invoking the subcommand, optionally with a response file.
>
>
> Hmm, you might be onto something..
>
> I'm wonder if could be implemented more cleanly as an additional step after
> the Compilation has been built, somewhere near the end of
> Driver::BuildCompilation(), or perhaps in its callers which know about the
> full command line length.
>
> Apart from solving the automation problem, that also feels more
> idiomatic/elegant. I don't know if it's practical to mutate that data
> structure in practice though.

Yes, I had hoped we could push this way down, basically making it an
implementation detail of how we invoke sub-processes: if we want to
pass too many command line arguments on certain platforms, put them
all in a response file.

But if it's as Saleem says, that some linkers only support this "file
lists" format, I guess that makes it trickier.

 - Hans



More information about the cfe-commits mailing list