[PATCH] Don't set $LIB if we're not targetting windows.

Filipe Cabecinhas filcab+llvm.phabricator at gmail.com
Thu Feb 19 09:14:07 PST 2015

The comment came with my private code. But I don't feel strongly about it.

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.

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)?

On Thursday, February 19, 2015, Timur Iskhodzhanov <timurrrr at google.com>

> Alexey,
> Of course we do use MSVC link.exe to link ASan tests.
> LLD is not ready for ASan on Windows as it doesn't produce debug info.
> ================
> Comment at: test/lit.common.cfg:64
> @@ -63,2 +63,3 @@
>  # Help MSVS link.exe find the standard libraries.
> -if platform.system() == 'Windows':
> +# Make sure we only try to use it when targetting Windows
> +if platform.system() == 'Windows' and
> config.target_triple.endswith('win32'):
> ----------------
> I don't understand the comment and how it is related to the change in the
> code.
> You've probably meant to write the condition meaning `"if MSVC:"` ?
> If so, I don't think you need an extra comment:
> ```
>   # On Windows, help MSVS link.exe find the standard libraries.
>   if platform.system() == 'Windows' and ...:
> ```
> Deferring the condition to Reid and Hans who know the triples better.
> http://reviews.llvm.org/D7739
>   http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150219/f4d221c0/attachment.html>

More information about the llvm-commits mailing list