<div dir="ltr">I wouldn't use my initial attempt. Instead of trying to cache linkPath directly, one should override getDefaultLinker() and add the bin path to FilePaths.<div><br></div><div>Then you could simplify setting linkPath, but doesn't solve all the problems.</div><div><br></div><div>The only other thing I'd suggest would be to remove the check for VC.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Aug 17, 2017 at 7:12 PM, Stephan T. Lavavej <span dir="ltr"><<a href="mailto:stl@exchange.microsoft.com" target="_blank">stl@exchange.microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">[Zachary Turner]<br>
<span class="">> Double checked the code. We use the lib path in case the user doesn't specify -libpath. But, looks like we already have an option for that, -libpath. <br>
> We need the bin path to find cl.exe (for fallback) and link.exe.<br>
> We also use the deduced include path when trying to find universal CRT, and I'm not sure if that's covered by -imsvc.<br>
<br>
</span>Don sent me <a href="https://reviews.llvm.org/D36842" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36842</a> which I built and hacked until I came up with <a href="https://reviews.llvm.org/D36857" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D36857</a> . This works for my x86 dev build (haven't tried x64 yet). I don't know if it's the "right" solution, but hopefully it will be of use.<br>
<br>
Since it caches the link.exe path, but doesn't really attempt to fix the underlying issue of path reconstruction, I don't think things like the "fall back to cl.exe" feature would work - but fortunately I never want cl.exe fallback with internal dev builds.<br>
<span class="HOEnZb"><font color="#888888"><br>
STL<br>
</font></span></blockquote></div><br></div>