[PATCH] Driver: generate file lists to pass through to linkers

Eric Christopher echristo at gmail.com
Wed Jun 18 12:56:44 PDT 2014


On Wed, Jun 18, 2014 at 12:52 PM, Nick Kledzik <kledzik at apple.com> wrote:
> On Jun 18, 2014, at 11:45 AM, Reid Kleckner <rnk at google.com> wrote:
>
> On Wed, Jun 18, 2014 at 11:12 AM, Hans Wennborg <hans at chromium.org> wrote:
>>
>> Are there really linkers that we care about that don't understand
>> response files, but accept these "file list files"?
>
>
> Unfortunately, yes, ld64.  Search the source for -filelist:
> http://www.opensource.apple.com/source/ld64/ld64-123.2.1/src/ld/Options.cpp
>
>
> For background: The darwin linker (ld64) has never supported @file
> arguments, because the linker is almost always invoked through the clang (or
> gcc before that) driver which expanded @file and passed its content as
> arguments to the linker.   Therefore @file never made it to the linker.  The
> darwin linker option for a file containing a list of files is -filelist
> <file>.
>
> Is the motivation for this is that some OSs have a limit to the number/size
> of command line arguments?  Or that clang internally has limits?
>

I think it's the former fwiw. Some link lines can get quite long.

-eric



More information about the cfe-commits mailing list