<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 13, 2016 at 3:30 PM, Rafael Avila de Espindola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">Andrew Kelley via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> writes:<br>
<br>
> On Tue, Dec 13, 2016 at 1:06 PM, Rui Ueyama via llvm-dev <<br>
> <a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> That said, I think the current our "API" to allow users call our linker's<br>
>> main function hit the sweet spot. I know at least a few LLVM-based language<br>
>> developers who want to eliminate external dependencies and embed a linker<br>
>> to their compilers. That's a reasonable usage, and I think allowing them to<br>
>> pass a map from filename to MemoryBuffer objects makes sense, too. That<br>
>> would be done without affecting the overall linker architecture. I don't<br>
>> oppose to that idea, and if someone wrote a patch, I'm fine with that.<br>
>><br>
><br>
> As an LLVM-based language developer, this is exactly what I want to do. In<br>
> short:<br>
><br>
>  * Avoid depending on an external binary<br>
>  * Avoid a fork+exec<br>
>  * Avoid unnecessary use of the filesystem<br>
><br>
> Does this feature compromise progress on the linker binary?<br>
><br>
> Would it be reasonable for this feature to exist in the next minor version<br>
> release of lld?<br>
<br>
</div></div>I would please ask for it to wait. It requires designing how the linker<br>
script parser and the thin archive system will fetch new files as they<br>
are found.<br></blockquote><div><br></div><div>That sounds fair. I'm thankful for all the hard work the LLD team is putting into the project, and it's not my place to demand any features.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Also, please consider what is so bad about writing a file. If your<br>
language has anything like translation unites than most of the program<br>
should already be in .o files.<br></blockquote><div><br></div><div>I see your point. It's true that "Avoid unnecessary use of the filesystem", while still a correct way to design software, is the least important of those three points. "Avoid depending on an external binary" is most of what I want to get out of the LLD project.</div></div><br></div></div>