[cfe-dev] Clang on Windows targteing gcc compiles very slowly

Nico Weber thakis at chromium.org
Sat May 30 22:40:56 PDT 2015


Can you post the cmake invocation you use?

In general, we see clang being faster than gcc on linux/mac, and about as
fast as cl.exe on windows on our bots. It sounds like you don't configure
your build correctly. (clang-built-by-clang is a bit faster than
clang-built-by-cl on windows; I don't know how clang-built-by-clang and
clang-built-by-gcc on windows compare. But if you're seeing a 2-3x
slowdown, you're probably accidentally doing a debug build of clang
somehow.)

On Sat, May 30, 2015 at 9:57 PM, Francois Pichet <pichet2000 at gmail.com>
wrote:

> I just noticed that assert is turned on even in Release on Windows
> Is that on purpose? (seems like a bug to me)
>
> Anyway if I build clang with "LLVM_ENABLE_ASSERTIONS:BOOL=OFF" the build
> get stuck at verifier.cpp from LLVMCore. CL.exe is stuck in an infinite
> loop.
>
> I am using MSVC 2013 Update 5.
>
> On Sat, May 30, 2015 at 10:30 AM, Reid Kleckner <rnk at google.com> wrote:
>
>> You said you configured in release mode, but assertions might still be
>> on. That accounts for a 2x slowdown. Otherwise I'd say that we haven't
>> profiled and optimized clang on windows very much.
>>
>> Sent from phone
>> On May 29, 2015 4:51 PM, "Edward Diener" <eldlistmailingz at tropicsoft.com>
>> wrote:
>>
>>> I test Boost libraries mostly on Windows using various version of gcc
>>> 4.3 and up, VC++ 8.0 and up, and the latest version of clang which I build
>>> from source using mingw/gcc-4.8.1 in release mode.
>>>
>>> While clang is a great compiler when it comes to testing code, getting
>>> intelligent error message, and implementing the latest C++ standard, it is
>>> noticably slower ( 2x or 3x at minimum ) than the other compilers I use.
>>>
>>> The clang command line parameters usually being used are usually along
>>> the lines of:
>>>
>>> -c -x c++ -O0 -g -fno-inline -Wall -g -march=i686 -m32
>>>
>>> with the addition of 'std=c++11' occasionally depending on the test.
>>>
>>> Does anybody have any idea why clang is so much slower than any of the
>>> other compilers I use ? It does not seem to matter whether it is in C++03
>>> mode or C++11 mode, it is noticeably slower than the other compilers.
>>>
>>> _______________________________________________
>>> cfe-dev mailing list
>>> cfe-dev at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>>
>>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>>
>>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150530/127008c3/attachment.html>


More information about the cfe-dev mailing list