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

David Majnemer via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 29 21:57:31 PDT 2016

On Tue, Mar 29, 2016 at 9:01 PM, Edward Diener via cfe-dev <
cfe-dev at lists.llvm.org> wrote:

> 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 ?

Yes: http://clang.llvm.org/docs/CrossCompilation.html#target-triple

> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160329/99da1500/attachment.html>

More information about the cfe-dev mailing list