Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all articles
Browse latest Browse all 1963

Win 32 CLANG is very slow?

$
0
0

I have loads of code written in C++ / VCL for Win32 - started with C++ Builder 6 (and used Borland C++ without VCL for work before then). But it is great to have access to C++ 11 features with the CLANG for Win 32. I have got to grips with the slight changes to the main Project1.cpp file between the two compilers so all looks good. Except the CLANG compiler takes much much longer to compile. Taking a fairly simple VCL project (several forms and several *.cpp units - no database access). If I compile in "debug" mode and do build all/clean/build all and time the second "build all" then my project compiles and links in about 7 seconds on my Win 7 PC. If I then go to project options and change (just) the setting from "classic" to "CLANG" for the compiler and do a second build all/clean/build all cycle and time the second build all it takes about 55 seconds.

This difference is time is dramatic. (over 7 times as long).

Does everyone find a similar difference between the two Win32 compilers when compiling VCL. Or is there some other option I need to change?

The timings suggest to me that maybe CLANG is not using precompiled headers (ie it is re-compiling the VCL header for each unit). Do I need to adjust something else to get this to work (this is an educated guess based only on the timings!).


Viewing all articles
Browse latest Browse all 1963

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>