<div dir="ltr">Fixed in r240180.</div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 2:36 PM, Rui Ueyama <span dir="ltr"><<a href="mailto:ruiu@google.com" target="_blank">ruiu@google.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">Right. I don't know why I believed that I needed to add a new path at beginning of the list... Fixing.</div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jun 19, 2015 at 2:15 PM, Peter Collingbourne <span dir="ltr"><<a href="mailto:peter@pcc.me.uk" target="_blank">peter@pcc.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On Sun, May 31, 2015 at 08:20:38PM -0000, Rui Ueyama wrote:<br>
> Author: ruiu<br>
> Date: Sun May 31 15:20:37 2015<br>
> New Revision: 238683<br>
><br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D238683-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=uGKSFv-TQuy0ksWpWZgiiftz4qPzjFRlotfGzErpoko&s=slPM5C71OGO0m3b4g2Fvdhatl2ZgZtF-mWlkK5lMj9o&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=238683&view=rev</a><br>
> Log:<br>
> COFF: /libpath should not take precedence over the current directory.<br>
><br>
> Modified:<br>
> lld/trunk/COFF/Driver.cpp<br>
><br>
> Modified: lld/trunk/COFF/Driver.cpp<br>
> URL: <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_lld_trunk_COFF_Driver.cpp-3Frev-3D238683-26r1-3D238682-26r2-3D238683-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=uGKSFv-TQuy0ksWpWZgiiftz4qPzjFRlotfGzErpoko&s=MtNYgdLV6MJwscFB90-1hIa9ngf64szZBAnmLv0Tkus&e=" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/lld/trunk/COFF/Driver.cpp?rev=238683&r1=238682&r2=238683&view=diff</a><br>
> ==============================================================================<br>
> --- lld/trunk/COFF/Driver.cpp (original)<br>
> +++ lld/trunk/COFF/Driver.cpp Sun May 31 15:20:37 2015<br>
> @@ -209,9 +209,11 @@ bool LinkerDriver::link(int Argc, const<br>
> Config->MachineType = MTOrErr.get();<br>
><br>
> // Handle /libpath<br>
> - // (Inserting at front of a vector is okay because it's short.)<br>
> - for (auto *Arg : Args->filtered(OPT_libpath))<br>
> - SearchPaths.insert(SearchPaths.begin(), Arg->getValue());<br>
> + for (auto *Arg : Args->filtered(OPT_libpath)) {<br>
> + // Inserting at front of a vector is okay because it's short.<br>
> + // +1 because the first entry is always "." (current directory).<br>
> + SearchPaths.insert(SearchPaths.begin() + 1, Arg->getValue());<br>
<br>
</span>I think this will add search paths in reverse order.<br>
<br>
Thanks,<br>
<span><font color="#888888">--<br>
Peter<br>
</font></span></blockquote></div><br></div>
</div></div></blockquote></div><br></div>