[cfe-commits] Windows driver cleanup (or however you want to call it)

João Matos ripzonetriton at gmail.com
Mon Jul 23 18:40:05 PDT 2012


> The logic in the batch file requires the user to run the appropriate
> batch file. So how would you implement this logic without the user
> running it?
>

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.

> I was just interpreting the source code, where Win32 is the VS triple
> and Mingw has its own. Maybe the first one should be called MSVC or
> something like that, but I digress. How does this feel wrong when
> triples exist for this very reason, for clang to decide which
> ToolChain to use?

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

Thoughts?

> Since this is a VS driver it makes sense to follow VS conventions, and
> this is exactly how the IDE works, it alters the environment before
> invoking cl.exe. Why should clang work any differently?

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.

-- 

João Matos
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20120724/29acc702/attachment.html>


More information about the cfe-commits mailing list