]> granicus.if.org Git - clang/commit
clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.
authorNico Weber <nicolasweber@gmx.de>
Tue, 17 Jul 2018 15:07:40 +0000 (15:07 +0000)
committerNico Weber <nicolasweber@gmx.de>
Tue, 17 Jul 2018 15:07:40 +0000 (15:07 +0000)
commit2ef99755830c3d74d9c54140ad06ff70eae3c34c
treea2377f1cbfdc1992b31fb22c4d94547cd2d898db
parent2a5e6fd94b730b5c48ce534a96f58352667e3f45
clang-cl: Postpone Wmsvc-not-found emission until link.exe gets used.

Wmsvc-not-found was added in r297851 to help diagnose why link.exe can't be
executed. However, it's emitted even when using -fuse-ld=lld, and in cross
builds there's no way to get rid of the warning other than disabling it.

Instead, emit it when we look up link.exe and it ends up not being executable.
That way, when passing -fuse-ld=lld it will never be printed.
It will also not be printed if we find link.exe on PATH.

(We might want to eventually default to lld one day, at least when running on a
non-Win host, but that's for another day.)

Fixes PR38016.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@337290 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Driver/ToolChains/MSVC.cpp
lib/Driver/ToolChains/MSVC.h