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

Nick Kledzik kledzik at apple.com
Fri Nov 2 11:35:40 PDT 2012


On Nov 2, 2012, at 10:35 AM, Shankar Easwaran wrote:

> Hi Nick,
> 
>> On Nov 2, 2012, at 8:03 AM, Shankar Easwaran wrote:
>> 
>>> I had a thought on the same approach too, the problem was ReaderELF had to be passed ReaderArchive too (or) at a bare minimum the ReaderArchiveOptions. 
>>> This would have broken things with other Readers. I discussed with Michael on IRC and he said putting it in File should be fine for now.
>> How would this have broken other readers?   In my proposal, ReaderELF would instantiate a ReaderArchive passing "this" for the ReaderArchiveOptions reader.
>> 
> 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:

     ReaderOptionsArchive(Reader *reader);

Other readers can use that constructor until the command line option handling is worked out.

-Nick


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121102/164adf51/attachment.html>


More information about the llvm-commits mailing list