[cfe-dev] Using Clang 5.0.0 RC2 with MSVC dev builds

Zachary Turner via cfe-dev cfe-dev at lists.llvm.org
Tue Aug 15 09:43:24 PDT 2017

Since we most likely cannot reproduce this without access to this same
development environment, I think the easiest way to figure this out would
be for Stephan to debug into clang itself.  It definitely sounds like a
problem, but I think only you will be able to figure out exactly what it
is.  Luckily it should be easy to figure out.  Set a breakpoint in the
constructor of MSVCToolChain in clang/lib/Driver/ToolChains/MSVC.cpp and
see what's going on in there.  Most likely it's the VCToolsInstallDir or
VCINSTALLDIR as Reid mentioned.

On Tue, Aug 15, 2017 at 9:30 AM Reid Kleckner <rnk at google.com> wrote:

> On Mon, Aug 14, 2017 at 6:17 PM, Reid Kleckner <rnk at google.com> wrote:
>> > 2. Is there a simple way for me to get Clang 4.0's behavior back, where
>> having cl.exe and link.exe on my PATH makes Clang automatically detect the
>> correct -fms-compatibility-version and link.exe to be used?
>> I haven't figured out what changed, but that definitely seems like a
>> regression.
> As I read the current code, we search the environment, then we try the new
> setup config API, and then we try the registry. That seems correct.
> I think the change from 4.0 to 5.0 was that when we look at the
> environment, we now try these variables in order:
> 1. VCToolsInstallDir: this is new
> 2. VCINSTALLDIR: we always tried this before PATH
> 3. PATH
> Are either of those first two variables set to point to 2013?
> Once clang finds cl.exe it calls GetFileVersionInfoW to work out the
> version, which should work as intended.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170815/848d773a/attachment.html>

More information about the cfe-dev mailing list