Random rants from a KDE user which also works on making KDE more Hebrew friendly.

Saturday, October 2, 2010

Building QtCreator

Whats so cool and new about it...? I build it using clang. Linking to a Qt compilation made with clang. Now that's a big step!

Some details: I compiled yesterday clang, and bootstapped into stage 3 (first compiled clang using gcc = stage 1, then compiled clang using clang from stage 2, and then compiled stage 3 using clang from stage 2, as a stress test to clang).

Then I compiled git cloned qt (http://gitorious.org/~elcuco/qt/llvm-support use clang-support-linux as your branch).  I used this configure line for qt: 

./configure -fast -no-pch -no-webkit -no-mmx -opensource -confirm-license -continue -prefix -platform linux-clang 

Some notes: mxx is disabled, since the the clang runtime does not yet support some MMX functions needed. Also webkit does not compile yet, but some work has been done upstream (in WebKit, not integrated into Qt yet) to compile using clang. I think the PCH support can be re-enabled, I will test in the next weeks.

Note also the "platform", this is an mkspec available from my repository. I also hacked configure.exe's source to have clang support. I still need to rebuild configure.exe using cl.exe and adding this to the repository. This is on my TODO list (also make this whole test under windows as well).

The next step was cloning QtCreator, and then

mkdir build-qmake-clang
cd build-qmake-clang
~/src/build-qt-clang/bin/qmake ..
make -j 10

I used 10 threads to compile, since clang compilations are really slow, and I did not see the 4 cores of my machine working too hard. (when building Qt I used -j4). I will test the next few days how stable, or non-stable is this QtCreator build, but it seems promissing. More stats in the next weeks as I gather more information.

Mandatory screenshot - nothing special here, right? 

PS: as a special bonus - this is a 64bit compilation: clang, Qt and QtCreator. How cool is that?