[cfe-dev] LLVM 3.8.0 clang binary for Windows targets VC++

Edward Diener via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 29 21:01:47 PDT 2016


On 3/29/2016 9:31 PM, Reid Kleckner via cfe-dev wrote:
> On Tue, Mar 29, 2016 at 6:14 PM, Edward Diener via cfe-dev
> <cfe-dev at lists.llvm.org
> <mailto:cfe-dev at lists.llvm.org>> wrote:
>
>     Still isn't distributing a clang Windows release which by default
>     targets VC++ for all clang invocations, and not just clang-cl, a bit
>     of a rude awakening for all those who have used clang on Windows
>     with mingw(-64)/gcc in the past ?
>
>
> Perhaps, but this has always been the default behavior if you build from
> source with MSVC for over two years now (r199250).
>
> Basically, if you build clang with mingw it will target mingw by
> default. If you build clang with MSVC, it will target MSVC by default.
> This was deemed to be consistent with how clang works on other
> platforms, where you get a host compiler by default. Either way, you can
> override the default with --target.

That make sense.

>
> It also happens that for a long time after that, Hans configured the
> builds at llvm.org/builds <http://llvm.org/builds> so that 'clang'
> targeted mingw by default, and 'clang-cl' targeted MSVC. We removed that
> flag from the packaging script some time ago, which probably confused
> some users.

What that did was change the default target on Windows for clang/clang++ 
from mingw/gcc to VC++. That change turned up for the LLVM 3.8 release. 
The confusion is that the change of the default target was made but the 
end-user was not told about it. So the end-user of clang for 3.8 on 
Windows, who never used a -target option, now gets in many ways a 
different compiler when he invokes clang++ for 3.8 on Windows than he 
had previously when he invoked clang++ for 3.7.1 on down on Windows.

Is the clang -target option officially documented anywhere ?




More information about the cfe-dev mailing list