[llvm-commits] [lld] Support reading archive libraries

Shankar Easwaran shankare at codeaurora.org
Fri Nov 2 12:06:11 PDT 2012


On 11/2/2012 2:03 PM, Nick Kledzik wrote:
> On Nov 2, 2012, at 11:55 AM, Shankar Easwaran wrote:
>> Hi Nick,
>>>> The ReaderArchiveOptions gets constructed using the command line flags thats passed to lld, along with the Reader. For the ReaderArchiveOptions to be created within ReaderELF,
>>>> the command line options (or) the appropriate flags that were read from the command line would be needed.
>>>>
>>>> Currently all the Readers(createReader*) take in ReaderOptionsELF only.
>>>
>>> You just defined class ReaderOptionsArchive with one constructor:
>>>
>>>      ReaderOptionsArchive(Reader *reader, int argc, char *argv[]);
>>>
>>> but it never uses the command line args.   Why not add another constructor:
>> I was going and planning to add a command line flag -whole-archive(similiar to the ld option) and construct the ReaderArchiveOptions based on that information.
> Except that that option name is different on different platforms (It is -force_load on Darwin).  The Options objects really should not be taking arc/argv.  They should have a set of fields to set (e.g. _isForceLoad) and some other command line parser knows how to set those fields.
Yes, planning on removing argc, argv.

Thanks

Shankar Easwaran



More information about the llvm-commits mailing list