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

Yaron Keren yaron.keren at gmail.com
Sat May 30 10:08:15 PDT 2015


LLVM_ENABLE_THREADS means that clang itself is thread-safe which may be
important if you use it as a library but not as a command line compiler. It
has nothing to do with clang output. With LLVM_ENABLE_THREADS there is some
mutex overhead which may be neglible.

2015-05-30 18:17 GMT+03:00 Edward Diener <eldlistmailingz at tropicsoft.com>:

> On 5/30/2015 1:35 AM, Yaron Keren wrote:
>
>> Try to  -DLLVM_ENABLE_THREADS:BOOL=OFF. Might not make a big difference.
>>
>
> Does this mean thread support in clang itself ? I need thread support in
> clang as I compile multi-threaded source.
>
>
>>
>> 2015-05-30 5:08 GMT+03:00 Edward Diener
>> <eldlistmailingz at tropicsoft.com
>> <mailto:eldlistmailingz at tropicsoft.com>>:
>>
>>     On 5/29/2015 9:35 PM, Justin Bogner wrote:
>>
>>         On Friday, May 29, 2015, Edward Diener
>>         <eldlistmailingz at tropicsoft.com
>>         <mailto:eldlistmailingz at tropicsoft.com>
>>         <mailto:eldlistmailingz at tropicsoft.com
>>
>>         <mailto: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.
>>
>>
>>         How are you building clang? I suspect that you're using a debug
>>         build of
>>         clang, which is quite slow.
>>
>>
>>     "which I build from source using mingw/gcc-4.8.1 in release mode."
>>
>
>
> _______________________________________________
> 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/09059b3c/attachment.html>


More information about the cfe-dev mailing list