<div dir="ltr">It'd be good to factor out the bodies of getDependentLibraryOption() into a static helper getWindowsLib() or something.  When it was just += "/DEFAULTLIB" it didn't seem reasonable.<div><br>
</div><div style>nit: trailing whitespace at "|| \n"</div><div style><br></div><div style>This test will probably fail on non-Windows platforms:</div><div style><div><br></div><div>-// CHECK: ![[AUTOLINK]] = metadata !{metadata !"{{(-l|/DEFAULTLIB:)}}autolink"}</div>
<div>+// CHECK: ![[AUTOLINK]] = metadata !{metadata !"{{(-l|/DEFAULTLIB:)}}autolink.lib"}</div><div><br></div><div style>You'll have to relax it.  I think {{(\.lib)?}} might work, but watch the bots afterwards if you can't easily test elsewhere before committing.</div>
<div><br></div><div style>The .lib here on Windows is desirable, although no one is using modules with autolink on Windows yet.</div></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 24, 2013 at 10:01 AM, Aaron Ballman <span dir="ltr"><<a href="mailto:aaron@aaronballman.com" target="_blank">aaron@aaronballman.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This patch moves the functionality to TargetInfo.  Interesting thing<br>
to note is that this changes the autolink behavior, whereas the<br>
previous patch did not; is that acceptable (I don't know much about<br>
autolink).<br>
<br>
Thanks!<br>
<span class="HOEnZb"><font color="#888888"><br>
~Aaron<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, May 24, 2013 at 7:55 AM, Reid Kleckner <<a href="mailto:rnk@google.com">rnk@google.com</a>> wrote:<br>
> It's probably better to move this to TargetInfo.  Specifically<br>
> WinX86_32/64TargetCodeGenInfo know about /defaultlib already.<br>
><br>
><br>
> On Thu, May 23, 2013 at 4:44 PM, Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>><br>
> wrote:<br>
>><br>
>> One of the things comment(lib) does in MSVC is automatically suffix<br>
>> the argument with ".lib" if needs be.  This patch implements the same<br>
>> logic, which allows us to properly link libraries such as ones<br>
>> provided by the MSDN examples<br>
>> (<a href="http://msdn.microsoft.com/en-us/library/7f0aews7(v=vs.80).aspx" target="_blank">http://msdn.microsoft.com/en-us/library/7f0aews7(v=vs.80).aspx</a>).<br>
>><br>
>> ~Aaron<br>
><br>
><br>
</div></div></blockquote></div><br></div>