[cfe-dev] clang-cl error on building simple cpp with only windows.h + boost-mutex included

Nico Weber via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 11 07:51:22 PST 2016


On Thu, Feb 11, 2016 at 10:48 AM, Dennis Luehring <dl.soluz at gmx.net> wrote:

> Am 11.02.2016 um 16:32 schrieb Nico Weber:
>
>> We regularly build Chromium with clang-cl. I believe Mozilla regularly
>> builds Firefox, and from patches going through this list it looks like the
>> Qt folks are working on getting Qt to build with clang-cl. clang-cl tries
>> to be very compatible with cl.exe, but for larger projects some tweaks in
>> the project itself is usually needed. If nobody at boost is looking at
>> this, chances are it won't work. (See e.g. slide 88 of
>>
>> https://docs.google.com/presentation/d/1oxNHaVjA9Gn_rTzX6HIpJHP7nXRua_0URXxxJ3oYRq0/edit#slide=id.gbf386ccf4_0_150
>> )
>>
>
> thanks for the docs
>
> so its just not wanted for clang-cl to be absolute 100% compatible -
> because to be compatible means wrong in some ways
>

In this case, I'm guessing something in boost does `#if __clang__` and then
assumes "not windows" in that block. If that's indeed the cause, the fix
would be to not define __clang__, which isn't an option. So yes, 100%
compatibility in the sense that clang-cl defines only the built-in macros
that cl.exe defines isn't a goal.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160211/3d6ce870/attachment.html>


More information about the cfe-dev mailing list