[PATCH] Move LinkerInput to LinkingContext.

Rui Ueyama ruiu at google.com
Mon Sep 2 21:19:55 PDT 2013


On Fri, Aug 30, 2013 at 8:25 PM, Shankar Kalpathi Easwaran <
shankarke at gmail.com> wrote:

>
>   When you try to parse the directive section, you are calling the Driver
> to parse and set various options, isnt it ?
>   I think you could add to the list of inputs at the time when you are
> called then right ?
>

Yes, I call WinLinkDriver to parse command line options, but that's only to
parse options. I don't call Driver::link or any other function in Driver.
Because driver for each flavor does not handle and cannot access inputFiles
now, I cannot add new input files to inputFiles during linking.

I think the real problem is that Driver::link is doing too much things in
one function; it creates 1) a list of input file objects from list of input
file names, 3) link them, 3) run passes, and 4) output a resulting file. If
we want to add a new file in the middle of that process, it's not easy to
do, because it does not allow us to run only step 1.

  The problem with handling it outside the driver is you have to create the
> actual input file, It might be a library or .obj, without an extension and
> so forth. The InputGraph nodes already deal with that kind of complexity.
>
>   I am not certain on this is the way, we want to do this change though.
>
> http://llvm-reviews.chandlerc.com/D1569
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130902/ee17aebb/attachment.html>


More information about the llvm-commits mailing list