<p>> The logic in the batch file requires the user to run the appropriate<br>
> batch file. So how would you implement this logic without the user<br>
> running it?<br>
></p>
<p>The only thing the user needs to tell is what platform to generate code for, which can be done via the triplet. The driver should then use the appropriate registry keys (as the batch files do) to setup the needed toolset.</p>

<p>
> I was just interpreting the source code, where Win32 is the VS triple<br>
> and Mingw has its own. Maybe the first one should be called MSVC or<br>
> something like that, but I digress. How does this feel wrong when<br>
> triples exist for this very reason, for clang to decide which<br>
> ToolChain to use?<br><br>It feels wrong to me because it's using the OS field, which should select between Win32 / Win64 / WinRT, to model between toolsets, like MinGW / MSVC / Win SDK. I'd rather have a new toolset flag (-ftoolset=winsdk/mingw/msvc8 9 10 11). This would be more flexible IMHO, and would not clutter the triplets. We also should think about supporting the new LLVM linker (lld).</p>

<p>Thoughts?</p><p>> Since this is a VS driver it makes sense to follow VS conventions, and<br>
> this is exactly how the IDE works, it alters the environment before<br>
> invoking cl.exe. Why should clang work any differently?</p><p>Because it doesn't make much sense to follow that aspect of cl.exe if we do not have compatibility with any of the flags anyway. That could be better done in a separate CL-compatible Clang driver.</p>

<p>-- </p><p>Joćo Matos</p>