<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 13, 2016 at 11:07 AM, Andrew Kelley <span dir="ltr"><<a href="mailto:superjoe30@gmail.com" target="_blank">superjoe30@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 dir="ltr"><span class=""><div class="gmail_extra"><div class="gmail_quote">On Tue, Dec 13, 2016 at 1:06 PM, Rui Ueyama via llvm-dev <span dir="ltr"><<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>That said, I think the current our "API" to allow users call our linker's main function hit the sweet spot. I know at least a few LLVM-based language developers who want to eliminate external dependencies and embed a linker to their compilers. That's a reasonable usage, and I think allowing them to pass a map from filename to MemoryBuffer objects makes sense, too. That would be done without affecting the overall linker architecture. I don't oppose to that idea, and if someone wrote a patch, I'm fine with that.</div></div></div></div></blockquote></div><br></div></span><div class="gmail_extra">As an LLVM-based language developer, this is exactly what I want to do. In short:</div><div class="gmail_extra"><br></div><div class="gmail_extra"> * Avoid depending on an external binary</div><div class="gmail_extra"> * Avoid a fork+exec</div><div class="gmail_extra"> * Avoid unnecessary use of the filesystem</div><div class="gmail_extra"><br></div><div class="gmail_extra">Does this feature compromise progress on the linker binary?</div></div></blockquote><div><br></div><div>I don't think so. There is a function in the driver to open input files, and you can make a change to that function.</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Would it be reasonable for this feature to exist in the next minor version release of lld?</div></div></blockquote></div></div><div class="gmail_extra"><br></div><div class="gmail_extra">By the next minor release, do you mean the next LLVM release that's planned early next year? If you write a patch, I can review (and Rafael would want to take a look too).</div></div>