[PATCH] Add DarwinInputGraph

Rui Ueyama ruiu at google.com
Tue Oct 21 15:58:03 PDT 2014


On Tue, Oct 21, 2014 at 3:41 PM, Michael Spencer <bigcheesegs at gmail.com>
wrote:

> On Mon, Oct 20, 2014 at 9:21 PM, Rui Ueyama <ruiu at google.com> wrote:
> > I'm not still sure whether or not "InputGraph" thing was after all the
> right way to abstract the input file list. That often makes easy things
> hard. In this case, sorting a list of input files became that hard. When I
> proposed the idea I was thinking that would make this kind of things easier
> to handle. I don't think the current shape of the API is not desirable at
> least. Or the fundamental idea was not very good.
> >
> > One thing we probably should consider is, in my opinion, we are pushing
> too hard to separate all ports. We are trying to write any
> architecture-dependent code into architecture-specific file. But the
> natural border of API doesn't always fit to the architecture
> dependent/independent border. We should probably relax that constraint a
> bit where that makes sense and write code that's short and easier to
> understand.
>
> I agree. The current InputGraph code makes modifying the input very
> difficult to do. Part of the reason for the model in the first place
> was to make this easy. I'm currently working on adding #pragma lib
> like support for ELF (PS4 specific stuff) and have found it basically
> impossible to add a new input file in the correct position in the
> graph with the current model.
>

To deal with the issue of the InputGraph I have a few ugly hacks in
PECOFF/LinkerGeneratedSymbolFile.h. There are a few virtual .a files there
that generate magical symbols on the fly to control the core linker in an
obscure way. These hacks need to be removed, but because the InputFile API
exists in between, it's impossible to do.

The InputGraph API design needs to be revisited and probably be rewritten.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141021/9bbd06c1/attachment.html>


More information about the llvm-commits mailing list