The comment came with my private code. But I don't feel strongly about it.<div><br></div><div>The thing is: we might be running on Windows, but targeting a different OS. In which case we don't want to pass LIB along. Your toolchain runs on Windows, but you're compiling for arch-vendor-anotheros.</div><div><br></div><div>Wouldn't lld on Windows also look at LIB if it was emulating link.exe (I don't know if there's a mode for that, like for emulating ld)?</div><div><br><br>On Thursday, February 19, 2015, Timur Iskhodzhanov <<a href="mailto:timurrrr@google.com">timurrrr@google.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Alexey,<br>
Of course we do use MSVC link.exe to link ASan tests.<br>
LLD is not ready for ASan on Windows as it doesn't produce debug info.<br>
<br>
<br>
================<br>
Comment at: test/lit.common.cfg:64<br>
@@ -63,2 +63,3 @@<br>
 # Help MSVS link.exe find the standard libraries.<br>
-if platform.system() == 'Windows':<br>
+# Make sure we only try to use it when targetting Windows<br>
+if platform.system() == 'Windows' and config.target_triple.endswith('win32'):<br>
----------------<br>
I don't understand the comment and how it is related to the change in the code.<br>
<br>
You've probably meant to write the condition meaning `"if MSVC:"` ?<br>
If so, I don't think you need an extra comment:<br>
```<br>
  # On Windows, help MSVS link.exe find the standard libraries.<br>
  if platform.system() == 'Windows' and ...:<br>
```<br>
<br>
Deferring the condition to Reid and Hans who know the triples better.<br>
<br>
<a href="http://reviews.llvm.org/D7739" target="_blank">http://reviews.llvm.org/D7739</a><br>
<br>
EMAIL PREFERENCES<br>
  <a href="http://reviews.llvm.org/settings/panel/emailpreferences/" target="_blank">http://reviews.llvm.org/settings/panel/emailpreferences/</a><br>
<br>
<br>
</blockquote></div>