Recommended flags for a minimalistic Qt build

hyperknot picture hyperknot · Apr 7, 2011 · Viewed 9.5k times · Source

I am trying to build Qt because it is required for Visual Studio 2010. The build script (configure.exe) is quite straightforward but by default it takes ages to compile. After waiting for an hour on a fast notebook with an SSD, I've given up (using no flags, just configure.exe).

What are the recommended flags for a basic, lightweight Qt application? I mean for someone learning Qt, who doesn't need WebKit and so on.

I've collected the most useful links I found:

The reference page for Qt configure: http://doc.qt.io/qt-4.8/configure-options.html

Ben's advice from this question: Building Qt 4.5 with Visual C++ 2010

-no-webkit -no-phonon -no-phonon-backend -no-script -no-scripttools -no-multimedia -no-qt3support -fast

Rubenvb's advice from this question: How to compile Qt as static

  1. Disable debug: -release
  2. Disable modules you don't need, especially QtWebKit: -no-webkit -no-script -no-scripttools -no-qt3support -nomake demos -nomake tools -nomake examples
  3. Disable LTCG support, which has the nasty side effect of generating huge static libraries: no-ltcg

Answer

Frank Osterfeld picture Frank Osterfeld · Apr 7, 2011

That should be ok. Everything beyond webkit is just micro-optimization, if it comes to build times (webkit is huge). I wouldn't set -nomake tools when you want to explore Qt, as you might want to use those tools.